docker-compose.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. version: '3'
  2. networks:
  3. web:
  4. external: true
  5. services:
  6. db:
  7. image: postgres:10-alpine
  8. restart: unless-stopped
  9. environment:
  10. - POSTGRES_DB=workaround # nextcloud wants to create the db itself
  11. - POSTGRES_USER=nextcloud
  12. env_file:
  13. - .env
  14. volumes:
  15. - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-cloud}/db:/var/lib/postgresql/data
  16. app:
  17. image: nextcloud:fpm-alpine
  18. restart: unless-stopped
  19. environment:
  20. - POSTGRES_DB=nextcloud
  21. - POSTGRES_USER=nextcloud
  22. - POSTGRES_HOST=db
  23. env_file:
  24. - .env
  25. volumes:
  26. - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-cloud}/app:/var/www/html
  27. web:
  28. build: .
  29. restart: unless-stopped
  30. volumes:
  31. - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-cloud}/app:/var/www/html:ro
  32. labels:
  33. traefik.enable: "true"
  34. traefik.frontend.rule: "Host: ${CHATONS_SERVICE:-cloud}.${CHATONS_DOMAIN:-localhost}, www.${CHATONS_SERVICE:-cloud}.${CHATONS_DOMAIN:-localhost}"
  35. networks:
  36. - web
  37. - default