docker-compose.debug.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. version: '3.4'
  2. services:
  3. # mongodb:
  4. # image: bitnami/mongodb:latest
  5. # ports:
  6. # - "27017"
  7. # volumes:
  8. # - data:/bitnami/mongodb
  9. # redis:
  10. # image: redis:6.2-alpine
  11. # hostname: redis
  12. # container_name: redis
  13. # command:
  14. # - 'redis-server'
  15. # - '--requirepass myStrongPassword'
  16. # ports:
  17. # - 36379:6379
  18. # restart: always
  19. # deploy:
  20. # placement:
  21. # constraints:
  22. # - "node.labels.type==queue"
  23. # restart_policy:
  24. # condition: on-failure
  25. # delay: 5s
  26. # max_attempts: 3
  27. # window: 120s
  28. # update_config:
  29. # parallelism: 2
  30. # delay: 10s
  31. # order: stop-first
  32. # rollback_config:
  33. # parallelism: 2
  34. # delay: 10s
  35. # order: stop-first
  36. db:
  37. container_name: db
  38. image: postgres:12
  39. restart: always
  40. volumes:
  41. - app-db-data:/var/lib/postgresql/data/pgdata
  42. env_file:
  43. - .env
  44. networks:
  45. - traefik-public
  46. ports:
  47. - 5432:5432
  48. environment:
  49. - PGDATA=/var/lib/postgresql/data/pgdata
  50. - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
  51. - POSTGRES_USER=${POSTGRES_USER?Variable not set}
  52. - POSTGRES_DB=${POSTGRES_DB?Variable not set}
  53. adminer:
  54. container_name: db-adminer
  55. image: adminer
  56. restart: always
  57. networks:
  58. - traefik-public
  59. depends_on:
  60. - db
  61. environment:
  62. - ADMINER_DESIGN=pepa-linha-dark
  63. labels:
  64. - traefik.enable=true
  65. - traefik.docker.network=traefik-public
  66. - traefik.constraint-label=traefik-public
  67. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.rule=Host(`adminer.${DOMAIN?Variable not set}`)
  68. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.entrypoints=http
  69. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.middlewares=https-redirect
  70. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.rule=Host(`adminer.${DOMAIN?Variable not set}`)
  71. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.entrypoints=https
  72. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.tls=true
  73. - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.tls.certresolver=le
  74. - traefik.http.services.${STACK_NAME?Variable not set}-adminer.loadbalancer.server.port=8080
  75. ports:
  76. - 8081:8080
  77. # backend:
  78. # container_name: backend
  79. # image: 'jianboy/${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}'
  80. # build:
  81. # context: ./backend
  82. # dockerfile: ./Dockerfile
  83. # args:
  84. # INSTALL_DEV: ${INSTALL_DEV-false}
  85. # volumes:
  86. # - ./backend:/app
  87. # restart: always
  88. # # command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m flask run --no-debugger --no-reload --host 0.0.0.0 --port 5002"]
  89. # networks:
  90. # - traefik-public
  91. # depends_on:
  92. # - db
  93. # ports:
  94. # - 8080:8080
  95. # env_file:
  96. # - .env
  97. # environment:
  98. # - DOMAIN=${DOMAIN}
  99. # - ENVIRONMENT=${ENVIRONMENT}
  100. # - BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS}
  101. # - SECRET_KEY=${SECRET_KEY?Variable not set}
  102. # - FIRST_SUPERUSER=${FIRST_SUPERUSER?Variable not set}
  103. # - FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD?Variable not set}
  104. # - USERS_OPEN_REGISTRATION=${USERS_OPEN_REGISTRATION}
  105. # - SMTP_HOST=${SMTP_HOST}
  106. # - SMTP_USER=${SMTP_USER}
  107. # - SMTP_PASSWORD=${SMTP_PASSWORD}
  108. # - EMAILS_FROM_EMAIL=${EMAILS_FROM_EMAIL}
  109. # - POSTGRES_SERVER=db
  110. # - POSTGRES_PORT=${POSTGRES_PORT}
  111. # - POSTGRES_DB=${POSTGRES_DB}
  112. # - POSTGRES_USER=${POSTGRES_USER?Variable not set}
  113. # - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
  114. # - SENTRY_DSN=${SENTRY_DSN}
  115. # platform: linux/amd64 # Patch for M1 Mac
  116. # labels:
  117. # - traefik.enable=true
  118. # - traefik.docker.network=traefik-public
  119. # - traefik.constraint-label=traefik-public
  120. # - traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=80
  121. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`) && PathPrefix(`/api`, `/docs`, `/redoc`)
  122. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.entrypoints=http
  123. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`) && PathPrefix(`/api`, `/docs`, `/redoc`)
  124. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.entrypoints=https
  125. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.tls=true
  126. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.tls.certresolver=le
  127. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-www-redirect
  128. # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.middlewares=${STACK_NAME?Variable not set}-www-redirect
  129. # frontend:
  130. # container_name: frontend
  131. # image: 'jianboy/${DOCKER_IMAGE_FRONTEND?Variable not set}:${TAG-latest}'
  132. # restart: always
  133. # networks:
  134. # - traefik-public
  135. # ports:
  136. # - 8082:80
  137. # build:
  138. # context: ./frontend
  139. # dockerfile: ./Dockerfile
  140. # args:
  141. # - VITE_API_URL=https://${DOMAIN?Variable not set}
  142. # - NODE_ENV=production
  143. # labels:
  144. # - traefik.enable=true
  145. # - traefik.docker.network=traefik-public
  146. # - traefik.constraint-label=traefik-public
  147. # - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80
  148. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`)
  149. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.entrypoints=http
  150. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`)
  151. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.entrypoints=https
  152. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls=true
  153. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls.certresolver=le
  154. # # Handle domain with and without "www" to redirect to only one
  155. # # To disable www redirection remove the next line
  156. # - traefik.http.middlewares.${STACK_NAME?Variable not set}-www-redirect.redirectregex.regex=^http(s)?://www.(${DOMAIN?Variable not set})/(.*)
  157. # # Redirect a domain with www to non-www
  158. # # To disable it remove the next line
  159. # - traefik.http.middlewares.${STACK_NAME?Variable not set}-www-redirect.redirectregex.replacement=http$${1}://${DOMAIN?Variable not set}/$${3}
  160. # # Middleware to redirect www, to disable it remove the next line
  161. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.middlewares=${STACK_NAME?Variable not set}-www-redirect
  162. # # Middleware to redirect www, and redirect HTTP to HTTPS
  163. # # to disable www redirection remove the section: ${STACK_NAME?Variable not set}-www-redirect,
  164. # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-www-redirect
  165. volumes:
  166. app-db-data:
  167. networks:
  168. traefik-public: # external: true