docker-compose.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. version: '3'
  2. networks:
  3. web:
  4. external: true
  5. volumes:
  6. data:
  7. services:
  8. db:
  9. image: postgres:11-alpine
  10. restart: unless-stopped
  11. env_file:
  12. - .env
  13. volumes:
  14. - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-limesurvey}/sql:/var/lib/postgresql/data
  15. app:
  16. build:
  17. context: .
  18. dockerfile: Dockerfile.fpm
  19. restart: unless-stopped
  20. env_file:
  21. - .env
  22. volumes:
  23. - data:/var/www/html
  24. - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-limesurvey}/upload:/var/www/html/upload
  25. web:
  26. build:
  27. context: .
  28. dockerfile: Dockerfile.nginx
  29. depends_on:
  30. - app
  31. labels:
  32. traefik.enable: "true"
  33. traefik.frontend.rule: "Host: ${CHATONS_SERVICE:-limesurvey}.${CHATONS_DOMAIN:-localhost}, www.${CHATONS_SERVICE:-limesurvey}.${CHATONS_DOMAIN:-localhost}"
  34. networks:
  35. - web
  36. - default
  37. volumes:
  38. - data:/var/www/html:ro
  39. - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-limesurvey}/upload:/var/www/html/upload:ro