docker-nextcloud/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/docker-compose.yml

115 lines
2.2 KiB
YAML
Raw Normal View History

2017-08-02 11:52:53 +02:00
version: '3'
2017-08-25 17:18:25 +02:00
services:
2017-08-02 11:52:53 +02:00
db:
image: mariadb:10.5
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
2017-08-25 17:18:25 +02:00
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
2017-08-25 17:18:25 +02:00
env_file:
- db.env
2017-08-02 11:52:53 +02:00
2021-04-26 19:15:37 +02:00
redis:
image: redis:alpine
restart: always
2018-08-01 22:55:25 +02:00
app:
image: nextcloud:fpm-alpine
2017-08-25 17:18:25 +02:00
restart: always
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
2021-04-26 19:15:37 +02:00
- REDIS_HOST=redis
2017-08-25 17:18:25 +02:00
env_file:
- db.env
depends_on:
- db
2021-04-26 19:15:37 +02:00
- redis
2017-08-25 17:18:25 +02:00
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
depends_on:
- app
networks:
- proxy-tier
- default
2017-08-02 11:52:53 +02:00
2021-04-26 19:15:37 +02:00
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
2017-08-02 11:52:53 +02:00
proxy:
2017-08-25 17:18:25 +02:00
build: ./proxy
restart: always
2017-08-02 11:52:53 +02:00
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
2017-08-02 11:52:53 +02:00
volumes:
2017-08-25 17:18:25 +02:00
- certs:/etc/nginx/certs:ro
2017-08-02 11:52:53 +02:00
- 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
2017-08-25 17:18:25 +02:00
restart: always
2017-08-02 11:52:53 +02:00
volumes:
- certs:/etc/nginx/certs
- acme:/etc/acme.sh
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
2017-08-02 11:52:53 +02:00
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
2017-08-25 17:18:25 +02:00
depends_on:
- proxy
2017-08-02 11:52:53 +02:00
2021-04-26 19:15:37 +02:00
# self signed
# omgwtfssl:
# image: paulczar/omgwtfssl
# restart: "no"
# volumes:
# - certs:/certs
# environment:
# - SSL_SUBJECT=servhostname.local
# - CA_SUBJECT=my@example.com
# - SSL_KEY=/certs/servhostname.local.key
# - SSL_CSR=/certs/servhostname.local.csr
# - SSL_CERT=/certs/servhostname.local.crt
# networks:
# - proxy-tier
2017-08-25 17:18:25 +02:00
volumes:
2017-08-02 11:52:53 +02:00
db:
2017-08-25 17:18:25 +02:00
nextcloud:
certs:
acme:
2017-08-25 17:18:25 +02:00
vhost.d:
html:
2017-08-02 11:52:53 +02:00
2017-08-25 17:18:25 +02:00
networks:
proxy-tier: