Skip to content

Instantly share code, notes, and snippets.

@vtronko
Last active July 7, 2020 02:37
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 vtronko/ab91ab96eeb607ecf9d6af5e9748cc63 to your computer and use it in GitHub Desktop.
Save vtronko/ab91ab96eeb607ecf9d6af5e9748cc63 to your computer and use it in GitHub Desktop.
docker compose for my nextcloud setup
version: '3.5'
volumes:
nextcloud:
db:
vhost.d:
services:
proxy:
image: jwilder/nginx-proxy:alpine
restart: unless-stopped
volumes:
- ./certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
proxy-tier:
ipv4_address: 172.20.0.100
environment:
- ENABLE_IPV6=false
ports:
- 443:443
- 80:80
app:
image: nextcloud
links:
- db
volumes:
- nextcloud:/var/www/html
restart: always
depends_on:
- db
environment:
- CERT_NAME=nextcloud.local
- VIRTUAL_HOST=nextcloud.local
- HTTPS_METHOD=noredirect
- VIRTUAL_PORT=80
- MYSQL_HOST=db
env_file:
- db.env
networks:
default:
proxy-tier:
ipv4_address: 172.20.0.200
# whoami:
# image: jwilder/whoami
# restart: always
# environment:
# environment:
# - CERT_NAME=test.local
# - VIRTUAL_HOST=test.local
# - VIRTUAL_PORT=80
# - MYSQL_HOST=db
# env_file:
# - db.env
# networks:
# default:
# proxy-tier:
# ipv4_address: 172.20.0.201
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=ripbattery
env_file:
- db.env
networks:
proxy-tier:
ipam:
config:
- subnet: 172.20.0.0/16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment