docker-compose.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. ports:
  54. - ${HTTP_PORT}:2015
  55. volumes:
  56. - app:/var/www/html:ro
  57. depends_on:
  58. - app
  59. # web-ssl:
  60. # build: ./web-ssl
  61. # restart: unless-stopped
  62. # environment:
  63. # - CADDYPATH=/certs
  64. # - HTTP_HOST=${HTTP_HOST}
  65. # ports:
  66. # - 80:80
  67. # - 443:443
  68. # volumes:
  69. # - app:/var/www/html:ro
  70. # - certs:/certs
  71. # depends_on:
  72. # - app
  73. # web-nginx:
  74. # build: ./web-nginx
  75. # restart: unless-stopped
  76. # ports:
  77. # - ${HTTP_PORT}:80
  78. # volumes:
  79. # - app:/var/www/html:ro
  80. # depends_on:
  81. # - app
  82. volumes:
  83. db:
  84. app:
  85. certs: