lab-nextcloud-docker-compose/docker-compose.yml

104 lines
1.9 KiB
YAML
Raw Normal View History

2022-05-08 01:22:08 +00:00
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
2022-05-08 01:22:08 +00:00
restart: always
volumes:
- nextcloud:/var/www/html
2022-05-08 02:47:31 +00:00
- ./cfssl:/cfssl
2022-05-08 01:22:08 +00:00
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:
2022-05-08 02:41:55 +00:00
build: ./nextcloud
2022-05-08 01:22:08 +00:00
restart: always
volumes:
- nextcloud:/var/www/html
2022-05-08 02:47:31 +00:00
- ./cfssl:/cfssl
2022-05-08 01:22:08 +00:00
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
2022-05-08 02:26:57 +00:00
cfssl:
image: cfssl/cfssl
2022-05-08 02:47:31 +00:00
restart: always
2022-05-08 02:26:57 +00:00
volumes:
2022-05-08 02:47:31 +00:00
- ./cfssl:/cfssl
2022-05-08 02:26:57 +00:00
working_dir: /cfssl
entrypoint: /bin/bash
command:
- /cfssl/entrypoint.sh
2022-05-08 01:22:08 +00:00
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:
networks:
proxy-tier: