lab-nextcloud-docker-compose/docker-compose.yml
François Pelletier dffac72df5 Ajout de cfssl
2022-05-07 22:41:55 -04:00

103 lines
No EOL
2 KiB
YAML

version: '3'
services:
db:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
build: ./nextcloud
restart: always
volumes:
- nextcloud:/var/www/html
- /home/ubuntu/nextcloud-jevalideca-compose/cfssl:/cfssl
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
environment:
- VIRTUAL_HOST=nc.jevalide.ca
- LETSENCRYPT_HOST=nc.jevalide.ca
- LETSENCRYPT_EMAIL=admin@jevalide.ca
depends_on:
- app
networks:
- proxy-tier
- default
cron:
build: ./nextcloud
restart: always
volumes:
- nextcloud:/var/www/html
- /home/ubuntu/nextcloud-jevalideca-compose/cfssl:/cfssl
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
letsencrypt-companion:
image: nginxproxy/acme-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- acme:/etc/acme.sh
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy
cfssl:
image: cfssl/cfssl
volumes:
- /home/ubuntu/nextcloud-jevalideca-compose/cfssl:/cfssl
working_dir: /cfssl
entrypoint: /bin/bash
command:
- /cfssl/entrypoint.sh
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:
networks:
proxy-tier: