feat: Add docker env

This commit is contained in:
Simon 2022-03-30 00:07:29 +02:00
parent 0fd5a49574
commit 66db00a532
5 changed files with 58 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything
**
!dist

2
.env Normal file
View File

@ -0,0 +1,2 @@
DOCKER_CONTEXT=vert.weko.resilien
URL=scores.ceiba-conseil.com

4
Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM registry.weko.io/nginx-lowtech:0.0.9
# Copie des sources du site
COPY dist /usr/share/nginx/html

28
docker-compose.prod.yml Normal file
View File

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

View File

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