I am using the image nextcloud:production-fpm-alpine
.
I tried to fix the permissions via a chown
command to fix them but I am not sure how to launch the app correctly after that. I use the tail
command to be sure that the container will not stop but…
If I use /entrypoint.sh
instead, it will say that parameters are missing.
Here is my Dockerfile :
version: '3.8'
volumes:
db:
nextcloud:
services:
db:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/mysql
environment:
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
secrets:
- postgres_db
- postgres_user
- postgres_password
ports:
- "5433:5432"
app:
image: nextcloud:production-fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- ./project/apps:/var/www/html/custom_apps
- ./project/config:/var/www/html/config
- ./project/data:/var/www/html/data
depends_on:
- db
environment:
- POSTGRES_HOST=db
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
- NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
- NEXTCLOUD_TRUSTED_DOMAINS=dev.cloud.otra.tech
secrets:
- nextcloud_admin_password
- nextcloud_admin_user
- postgres_db
- postgres_password
- postgres_user
command: sh -c 'chown -R www-data:www-data /var/www/html && tail -f /dev/null'
web:
build: ./nginx
image: nginx:stable-alpine-lp
restart: always
ports:
- "8080:80"
- "444:443"
depends_on:
- app
volumes:
- nextcloud:/var/www/html:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/certs:/etc/nginx/certs:ro
secrets:
nextcloud_admin_password:
file: ./secrets/nextcloud_admin_password.txt
nextcloud_admin_user:
file: ./secrets/nextcloud_admin_user.txt
postgres_db:
file: ./secrets/postgres_db.txt
postgres_password:
file: ./secrets/postgres_password.txt
postgres_user:
file: ./secrets/postgres_user.txt
How can I modify the command:
parameter to make it work?