add dockerfile and compose file to containerize app

This commit is contained in:
Nayan
2025-05-09 12:57:26 -04:00
parent 8aded40c90
commit ce4cf5f5cc
2 changed files with 24 additions and 0 deletions

15
Dockerfile Normal file
View 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
View File

@@ -0,0 +1,9 @@
services:
web:
build: .
ports:
- "8080:8080"
volumes:
- type: bind
source: ./logs
target: /app/logs