Skip to content

Instantly share code, notes, and snippets.

@Oliv4945
Last active March 18, 2020 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oliv4945/a23d0e954dfe4a6fe3d5cbb70734998c to your computer and use it in GitHub Desktop.
Save Oliv4945/a23d0e954dfe4a6fe3d5cbb70734998c to your computer and use it in GitHub Desktop.
version: '3.5'
services:
db:
image: mariadb
container_name: mariadb
command: '--transaction-isolation=READ-COMMITTED --binlog-format=ROW'
restart: unless-stopped
volumes:
- 'db:/var/lib/mysql'
- ../../data/mariadb:/data
env_file:
- db.env
networks:
- network-sql
ports:
- 3306:3306
deploy:
resources:
limits:
memory: 800M
cpus: '0.50'
volumes:
db:
networks:
network-sql:
name: sql
version: '3.5'
services:
app:
image: nextcloud:18-apache
restart: unless-stopped
volumes:
- ../../data/nextcloud:/var/www/html
environment:
- VIRTUAL_HOST=nextcloud.XXX.XX
- LETSENCRYPT_HOST=nextcloud.XXX.XX
- LETSENCRYPT_EMAIL=XXX@XXX.XXX
- MYSQL_HOST=mariadb
env_file:
- db.env
networks:
- network-https-proxy
- network-sql
networks:
network-sql:
name: "sql"
external: true
network-https-proxy:
name: "https-proxy"
external: true
version: '3.5'
services:
proxy:
build: ./proxy
restart: unless-stopped
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:
- network-proxy
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: unless-stopped
volumes:
- 'certs:/etc/nginx/certs'
- 'vhost.d:/etc/nginx/vhost.d'
- 'html:/usr/share/nginx/html'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
depends_on:
- proxy
networks:
- network-proxy
volumes:
certs: null
vhost.d: null
html: null
networks:
network-proxy:
name: https-proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment