anonymous env and add docker-compose file.

pull/2/head
Thurloat 5 years ago
parent 22e43717e8
commit 1efd54e56e
Signed by: thurloat
GPG Key ID: 9899F753371E6129
  1. 91
      docker-compose.yml
  2. 4
      env/db
  3. 3
      env/web

@ -0,0 +1,91 @@
version: '3'
services:
db:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
env_file:
- env/db
app:
image: nextcloud:fpm-alpine
dns: 8.8.8.8
restart: always
volumes:
- nextcloud:/var/www/html
env_file:
- env/db
depends_on:
- db
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
env_file:
- env/web
depends_on:
- app
networks:
- proxy-tier
- default
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
depends_on:
- app
entrypoint: |
sh -c 'sh -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
while /bin/true; do
echo Starting cron
su -s "/bin/sh" -c "/usr/local/bin/php /var/www/html/cron.php" www-data
echo $$(date) - Running cron finished
sleep 900
done
EOF'
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: jrcs/letsencrypt-nginx-proxy-companion
restart: always
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
networks:
- proxy-tier
depends_on:
- proxy
volumes:
db:
nextcloud:
certs:
vhost.d:
html:
networks:
proxy-tier:

4
env/db vendored

@ -0,0 +1,4 @@
POSTGRES_PASSWORD=INSECURE
POSTGRES_DB=nextcloud
POSTGRES_USER=nextcloud
POSTGRES_HOST=db

3
env/web vendored

@ -0,0 +1,3 @@
VIRTUAL_HOST=cloud.example.org
LETSENCRYPT_HOST=cloud.example.org
LETSENCRYPT_EMAIL=owner@cloud.example.org
Loading…
Cancel
Save