Add stack.yml
This commit is contained in:
parent
6fbdb0cc05
commit
dba66a2d18
53
stack.yml
Normal file
53
stack.yml
Normal file
@ -0,0 +1,53 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
|
||||
app:
|
||||
image: nextcloud
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- POSTGRES_DB=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
cron:
|
||||
image: nextcloud
|
||||
restart: always
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
user: www-data
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
|
||||
while [ ! -f /var/www/html/config/config.php ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
while true; do
|
||||
php -f /var/www/html/cron.php
|
||||
sleep 15m
|
||||
done
|
||||
EOF'
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
db:
|
||||
nextcloud:
|
Loading…
Reference in New Issue
Block a user