Skip to content

Commit

Permalink
adding two dbs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbris committed Sep 26, 2023
1 parent 554b6ea commit 245d82e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ ADMINER_PORT=8081
# Prefect
PREFECT_TAG=2.13.2-python3.10
PREFECT_PORT=4200
PREFECT_DB_PORT=5433
PREFECT_UI_URL=http://127.0.0.1:4200/api
PREFECT_SERVER_API_URL=http://127.0.0.1:4200/api
PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}
PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://${DB_USER}:${DB_PASSWORD}@prefect-postgres:5432/prefect
PREFECT_API_URL=http://prefect-server:4200/api

# MLFlow
Expand Down
19 changes: 18 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
PREFECT_SERVER_API_HOST: 0.0.0.0
PREFECT_API_DATABASE_CONNECTION_URL: $PREFECT_API_DATABASE_CONNECTION_URL
depends_on:
- postgres
- prefect-postgres
ports:
- ${PREFECT_PORT}:4200
volumes:
Expand Down Expand Up @@ -101,6 +101,22 @@ services:
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/prefect-flows; /usr/bin/mc policy download s3/prefect-flows;
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/data; /usr/bin/mc policy download s3/data; exit 0; '
prefect-postgres:
image: postgres:${POSTGRES_TAG}
container_name: ${PROJECT_NAME}-prefect-postgres
hostname: prefect-postgres
restart: unless-stopped
stop_grace_period: 10s
env_file: .env
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: prefect
POSTGRES_USER: $DB_USER
ports:
- ${PREFECT_DB_PORT}:5432
volumes:
- prefect-postgres-data:/var/lib/postgresql/data

postgres:
image: postgres:${POSTGRES_TAG}
container_name: ${PROJECT_NAME}-postgres
Expand Down Expand Up @@ -149,6 +165,7 @@ networks:
volumes:
prefect-data: {}
postgres-data: {}
prefect-postgres-data: {}
minio-data: {}
portainer-data: {}

0 comments on commit 245d82e

Please sign in to comment.