docker-compose.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. version: '3'
  2. # set database password in .env
  3. # please don't use quote (') or (") symbols in variables
  4. services:
  5. db:
  6. image: postgres:11-alpine
  7. restart: unless-stopped
  8. volumes:
  9. - db:/var/lib/postgresql/data
  10. environment:
  11. - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
  12. - POSTGRES_USER=${POSTGRES_USER}
  13. ports:
  14. - ${POSTGRES_PORT}:5432
  15. redis:
  16. image: redis:5.0-alpine
  17. restart: unless-stopped
  18. ports:
  19. - ${REDIS_PORT}:6379
  20. app:
  21. build:
  22. context:
  23. ./app
  24. restart: unless-stopped
  25. environment:
  26. - DB_TYPE=pgsql
  27. - DB_HOST=db
  28. - REDIS_SERVER=redis
  29. - DB_NAME=${POSTGRES_USER}
  30. - DB_USER=${POSTGRES_USER}
  31. - DB_PASS=${POSTGRES_PASSWORD}
  32. - OWNER_UID=${OWNER_UID}
  33. - OWNER_GID=${OWNER_GID}
  34. volumes:
  35. - app:/var/www/html
  36. depends_on:
  37. - db
  38. web-nginx:
  39. build: ./web-nginx
  40. restart: unless-stopped
  41. ports:
  42. - ${HTTP_PORT}:80
  43. volumes:
  44. - app:/var/www/html:ro
  45. depends_on:
  46. - app
  47. volumes:
  48. db:
  49. app:
  50. certs: