docker-compose.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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:12-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. app:
  14. build:
  15. context:
  16. ./app
  17. restart: unless-stopped
  18. environment:
  19. - DB_TYPE=pgsql
  20. - DB_HOST=db
  21. - DB_NAME=${POSTGRES_USER}
  22. - DB_USER=${POSTGRES_USER}
  23. - DB_PASS=${POSTGRES_PASSWORD}
  24. - OWNER_UID=${OWNER_UID}
  25. - OWNER_GID=${OWNER_GID}
  26. - SELF_URL_PATH=${SELF_URL_PATH}
  27. volumes:
  28. - app:/var/www/html
  29. depends_on:
  30. - db
  31. updater:
  32. build:
  33. context:
  34. ./app
  35. restart: unless-stopped
  36. environment:
  37. - DB_TYPE=pgsql
  38. - DB_HOST=db
  39. - DB_NAME=${POSTGRES_USER}
  40. - DB_USER=${POSTGRES_USER}
  41. - DB_PASS=${POSTGRES_PASSWORD}
  42. - OWNER_UID=${OWNER_UID}
  43. - OWNER_GID=${OWNER_GID}
  44. - SELF_URL_PATH=${SELF_URL_PATH}
  45. volumes:
  46. - app:/var/www/html
  47. depends_on:
  48. - app
  49. command: /updater.sh
  50. web:
  51. build: ./web
  52. restart: unless-stopped
  53. environment:
  54. - CADDYPATH=/certs
  55. - HTTP_HOST=${HTTP_HOST}
  56. ports:
  57. - ${HTTP_PORT}:443
  58. volumes:
  59. - app:/var/www/html:ro
  60. - certs:/certs
  61. depends_on:
  62. - app
  63. # web-ssl:
  64. # build: ./web-ssl
  65. # restart: unless-stopped
  66. # environment:
  67. # - CADDYPATH=/certs
  68. # - HTTP_HOST=${HTTP_HOST}
  69. # ports:
  70. # - 80:80
  71. # - 443:443
  72. # volumes:
  73. # - app:/var/www/html:ro
  74. # - certs:/certs
  75. # depends_on:
  76. # - app
  77. # web-nginx:
  78. # build: ./web-nginx
  79. # restart: unless-stopped
  80. # ports:
  81. # - ${HTTP_PORT}:80
  82. # volumes:
  83. # - app:/var/www/html:ro
  84. # depends_on:
  85. # - app
  86. volumes:
  87. db:
  88. app:
  89. certs: