diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0efb460 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +# Ignore everything +** + +!dist diff --git a/.env b/.env new file mode 100644 index 0000000..32e3790 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +DOCKER_CONTEXT=vert.weko.resilien +URL=scores.ceiba-conseil.com diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..201dfb8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM registry.weko.io/nginx-lowtech:0.0.9 + +# Copie des sources du site +COPY dist /usr/share/nginx/html diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 0000000..a02d18d --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,28 @@ +version: "3.8" + +volumes: + ceiba-log: + name: ceiba-log + ceiba-stats: + name: ceiba-stats + +services: + scores_ceiba-prod: + container_name: ceiba-prod + build: . + image: registry.weko.io/scores_ceiba:latest + restart: always + labels: + traefik.enable: "true" + traefik.http.routers.ceiba.rule: "Host(`${URL}`)" + traefik.http.routers.ceiba.entrypoints: "web" + com.centurylinklabs.watchtower.enable: true + volumes: + - ceiba-log:/var/log/nginx + - ceiba-stats:/usr/share/nginx/html/stats + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + +networks: + default: + name: traefik diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml new file mode 100644 index 0000000..1e86fa3 --- /dev/null +++ b/docker-compose.staging.yml @@ -0,0 +1,20 @@ +version: "3.8" + +networks: + default: + name: traefik + +services: + scores_ceiba-staging: + container_name: ceiba-staging + build: . + image: registry.weko.io/scores_ceiba:staging + restart: always + labels: + traefik.enable: "true" + traefik.http.routers.ceiba-staging.rule: "Host(`staging.${URL}`)" + traefik.http.routers.ceiba-staging.entrypoints: "web" + com.centurylinklabs.watchtower.enable: true + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro