diff --git a/.env b/.env new file mode 100644 index 0000000..6c043f8 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +HOST_PORT=4009 +URL=birthday.velouria.dev \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6c9762e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM nginx:alpine + +COPY index.html /usr/share/nginx/html/ +COPY map.html /usr/share/nginx/html/ + +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 8000 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..146df11 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3' + +services: + img: + build: . + ports: + - "${HOST_PORT}:8000" + restart: always + labels: + - "traefik.enable=true" + - "traefik.http.routers.img.rule=Host(`${URL}`)" + - "traefik.http.routers.img.entrypoints=websecure" + - "traefik.http.routers.img.tls.certresolver=myresolver" + - "traefik.http.services.img.loadbalancer.server.port=8000" + networks: + - traefik_network + +networks: + traefik_network: + external: true \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..9542e45 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +server { + listen 8000; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file