🔧 chore(deploy): update docker-compose version to 3.8 for better compatibility and features

🐳 chore(deploy): update traefik image version to v3.0 for improved functionality and compatibility
🔧 chore(deploy): remove unnecessary port mappings for backend, queue, pgadmin, redis, prometheus, and grafana services
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-21 08:19:12 -03:00
commit fe65b63400
2 changed files with 20 additions and 16 deletions

View file

@ -1,4 +1,4 @@
version: "3.3" version: "3.8"
services: services:
proxy: proxy:
ports: ports:

View file

@ -1,8 +1,8 @@
version: "3.3" version: "3.8"
services: services:
proxy: proxy:
image: traefik:v2.2 image: traefik:v3.0
networks: networks:
- ${TRAEFIK_PUBLIC_NETWORK?Variable not set} - ${TRAEFIK_PUBLIC_NETWORK?Variable not set}
- default - default
@ -73,12 +73,14 @@ services:
dockerfile: base.Dockerfile dockerfile: base.Dockerfile
# user: your-non-root-user # Make sure your Dockerfile creates this user # user: your-non-root-user # Make sure your Dockerfile creates this user
depends_on: depends_on:
- queue db:
- db condition: service_healthy
queue:
condition: service_healthy
env_file: env_file:
- backend.env - backend.env
ports: # ports:
- "7860" # - 7860
volumes: volumes:
- ../:/app - ../:/app
- ./startup-backend.sh:/startup-backend.sh # Ensure the paths match - ./startup-backend.sh:/startup-backend.sh # Ensure the paths match
@ -104,6 +106,8 @@ services:
placement: placement:
constraints: constraints:
- node.labels.${STACK_NAME?Variable not set}.app-db-data == true - node.labels.${STACK_NAME?Variable not set}.app-db-data == true
healthcheck:
test: "exit 0"
pgadmin: pgadmin:
image: dpage/pgadmin4 image: dpage/pgadmin4
@ -113,7 +117,8 @@ services:
env_file: env_file:
- ./pgadmin.env - ./pgadmin.env
depends_on: depends_on:
- db db:
condition: service_healthy
volumes: volumes:
- ./pgadmin:/var/lib/pgadmin - ./pgadmin:/var/lib/pgadmin
deploy: deploy:
@ -132,8 +137,8 @@ services:
queue: queue:
image: redis:6.2.5 image: redis:6.2.5
ports: # ports:
- "6379:6379" # - 6379:6379
healthcheck: healthcheck:
test: "exit 0" test: "exit 0"
@ -166,8 +171,7 @@ services:
- ./flower.env - ./flower.env
environment: environment:
- CELERY_BROKER_URL='redis://$${LANGFLOW_REDIS_PASSWORD:+default:$${LANGFLOW_REDIS_PASSWORD}@}$${LANGFLOW_REDIS_HOST}:$${LANGFLOW_REDIS_PORT}/$${LANGFLOW_REDIS_DB}' - CELERY_BROKER_URL='redis://$${LANGFLOW_REDIS_PASSWORD:+default:$${LANGFLOW_REDIS_PASSWORD}@}$${LANGFLOW_REDIS_HOST}:$${LANGFLOW_REDIS_PORT}/$${LANGFLOW_REDIS_DB}'
ports: - FLOWER_PORT=5555
- "5555:5555"
deploy: deploy:
labels: labels:
- traefik.enable=true - traefik.enable=true
@ -208,8 +212,8 @@ services:
- ./prometheus.yml:/etc/prometheus/prometheus.yml - ./prometheus.yml:/etc/prometheus/prometheus.yml
command: command:
- "--config.file=/etc/prometheus/prometheus.yml" - "--config.file=/etc/prometheus/prometheus.yml"
ports: # ports:
- "9090:9090" # - 9090:9090
healthcheck: healthcheck:
test: "exit 0" test: "exit 0"
deploy: deploy:
@ -224,8 +228,8 @@ services:
depends_on: depends_on:
prometheus: prometheus:
condition: service_healthy condition: service_healthy
ports: # ports:
- "3000:3000" # - 3000:3000
volumes: volumes:
- grafana_data:/var/lib/grafana - grafana_data:/var/lib/grafana
deploy: deploy: