diff --git a/server/Dockerfile b/server/Dockerfile index 7c6cc7f..1499287 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,6 +1,7 @@ FROM fedora:32 -RUN /bin/bash -c "dnf install g++ enet-devel gtest gmock gmock-devel gtest-devel -y" +# Build and setup app +RUN dnf install g++ enet-devel gtest gmock gmock-devel gtest-devel -y ADD / /dt @@ -8,4 +9,15 @@ RUN cd /dt; /dt/build.sh CMD ["/dt/builds/server.out"] +# Setup status endpoint +RUN dnf install nginx -y + +COPY nginx.conf /etc/nginx/conf.d/nginx.conf + +RUN rm /etc/nginx/conf.d/default.conf + +RUN systemctl start nginx.service + + +EXPOSE 80/tcp EXPOSE 7777/udp \ No newline at end of file diff --git a/server/nginx.conf b/server/nginx.conf new file mode 100644 index 0000000..1477c33 --- /dev/null +++ b/server/nginx.conf @@ -0,0 +1,10 @@ +server { + location / { + root /usr/share/nginx/html; + } + + location /health { + return 200 'alive'; + add_header Content-Type text/plain; + } +} \ No newline at end of file