diff --git a/Dockerfile b/Dockerfile index 2e6da62..f365972 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,17 @@ -FROM ubuntu:18.04 +FROM heroku/heroku:20-build as builder WORKDIR /app -COPY . /app +COPY . . -RUN apt update -y && apt install make clang -y +RUN make -RUN make +FROM heroku/heroku:20 -CMD ["./build/server", "$PORT"] \ No newline at end of file +WORKDIR /srv + +COPY --from=builder /app . + +RUN echo 5000 + +CMD ["./build/server", "5000"] \ No newline at end of file diff --git a/readme.txt b/readme.txt index a9c1859..87166f0 100644 --- a/readme.txt +++ b/readme.txt @@ -1 +1,8 @@ -Webserver in c. !Experimental! \ No newline at end of file +Webserver in c. !Experimental! + +Deployment: + +Docker and Heroku deployment are supported. To do Heroku deployment use https://github.com/heroku/heroku-buildpack-c buildpack. For Docker just build container image and run it exposing port: + +docker build -t c-dmitriy.icu . +docker run -dp 5000:5000 c-dmitriy.icu \ No newline at end of file