Add docker

This commit is contained in:
Gal 2024-09-25 18:24:10 +02:00
parent 0e757acf3b
commit a546472fe8
Signed by: gal
GPG Key ID: F035BC65003BC00B
4 changed files with 46 additions and 0 deletions

2
.env Normal file
View File

@ -0,0 +1,2 @@
HOST_PORT=4009
URL=birthday.velouria.dev

10
Dockerfile Normal file
View File

@ -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;"]

20
docker-compose.yml Normal file
View File

@ -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

14
nginx.conf Normal file
View File

@ -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;
}
}