use postgres config

This commit is contained in:
Blair Vanderlugt 2021-08-18 13:56:25 -04:00
parent f738689096
commit 11735b2bc4
3 changed files with 9 additions and 60 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ build/
**/.venv **/.venv
.idea .idea
**/.vim **/.vim
docker-stack.yml

View File

@ -33,13 +33,13 @@ services:
POSTGRES_HOST_AUTH_METHOD: trust # for postgres user access w/o password. Obvioulsy not safe but allows easy elevated debugging. POSTGRES_HOST_AUTH_METHOD: trust # for postgres user access w/o password. Obvioulsy not safe but allows easy elevated debugging.
ports: ports:
- ${DEV_POSTGRES_PORT:-63432}:5432 - ${DEV_POSTGRES_PORT:-63432}:5432
volumes:
- ./scripts/initdb/create_db.sql:/docker-entrypoint-initdb.d/1-create_all_db.sql
pgadmin: pgadmin:
ports: ports:
- "5050:5050" - "5050:5050"
# depends_on:
# - postgres
#
flower: flower:
ports: ports:
- "5555:5555" - "5555:5555"
@ -71,65 +71,15 @@ services:
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=PathPrefix(`/`) - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=PathPrefix(`/`)
- traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80 - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80
#contract-migration:
# depends_on:
# - eth
# - postgres
# - redis
# - cic-eth-tasker
#cic-cache-tracker:
# depends_on:
# - redis
# - postgres
# - eth
#cic-cache-tasker:
# depends_on:
# - redis
# - postgres
# - eth
cic-cache-server: cic-cache-server:
ports: ports:
- "63313:8000" - "63313:8000"
#depends_on:
# - postgres
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set} - traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
- traefik.http.routers.${STACK_NAME?Variable not set}-cache-http.rule=PathPrefix(`/`) - traefik.http.routers.${STACK_NAME?Variable not set}-cache-http.rule=PathPrefix(`/`)
- traefik.http.services.${STACK_NAME?Variable not set}-cache.loadbalancer.server.port=63313 - traefik.http.services.${STACK_NAME?Variable not set}-cache.loadbalancer.server.port=63313
#cic-eth-tasker:
# depends_on:
# - eth
# - postgres
# - redis
#cic-eth-tracker:
# depends_on:
# - eth
# - postgres
# - redis
#cic-eth-dispatcher:
# depends_on:
# - eth
# - postgres
# - redis
#cic-eth-retrier:
# depends_on:
# - eth
# - postgres
# - redis
#cic-notify-tasker:
# depends_on:
# - postgres
# - redis
cic-meta-server: cic-meta-server:
ports: ports:
- ${HTTP_PORT_CIC_META:-63380}:8000 - ${HTTP_PORT_CIC_META:-63380}:8000
@ -164,10 +114,6 @@ services:
- traefik.http.routers.${STACK_NAME?Variable not set}-user-http.rule=PathPrefix(`/`) - traefik.http.routers.${STACK_NAME?Variable not set}-user-http.rule=PathPrefix(`/`)
- traefik.http.services.${STACK_NAME?Variable not set}-user.loadbalancer.server.port=63415 - traefik.http.services.${STACK_NAME?Variable not set}-user.loadbalancer.server.port=63415
# cic-user-tasker:
# depends_on:
# - postgres
# - redis
networks: networks:
traefik-public: traefik-public:

View File

@ -129,13 +129,15 @@ services:
ports: ports:
- 5432 - 5432
command: [ "-c", "max_connections=200" ] command: [ "-c", "max_connections=200" ]
volumes:
- postgres-db:/var/lib/postgresql/data
configs:
- source: create_db.sql
target: /docker-entrypoint-initdb.d/1-create_all_db.sql
deploy: deploy:
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
volumes:
- ./scripts/initdb/create_db.sql:/docker-entrypoint-initdb.d/1-create_all_db.sql
- postgres-db:/var/lib/postgresql/data
redis: redis:
image: redis:6.0.9-alpine image: redis:6.0.9-alpine