mirror of
https://github.com/opus-tango/http-server-in-c.git
synced 2026-03-20 03:55:25 +00:00
add dockerfile and compose file to containerize app
This commit is contained in:
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
FROM ubuntu
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y build-essential
|
||||||
|
|
||||||
|
RUN mkdir /app
|
||||||
|
COPY *.c /app
|
||||||
|
COPY *.h /app
|
||||||
|
COPY Makefile /app
|
||||||
|
COPY /public /app/public
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN make release
|
||||||
|
|
||||||
|
CMD ["./webserver.out"]
|
||||||
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ./logs
|
||||||
|
target: /app/logs
|
||||||
Reference in New Issue
Block a user