-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1860 from Agenta-AI/feature/update-oss-production…
…-image-pipeline [Feature]: Added postgres to gh compose for production use
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,11 @@ services: | |
image: ghcr.io/agenta-ai/agenta-backend | ||
environment: | ||
- MONGODB_URI=mongodb://username:password@mongo:27017 | ||
- POSTGRES_URI=postgresql+asyncpg://username:password@postgres:5432/agenta_oss | ||
- REDIS_URL=redis://redis:6379/0 | ||
- ENVIRONMENT=production | ||
- DATABASE_MODE=v2 | ||
- MIGRATION_SRC_MONGO_DB_NAME=v2 | ||
- FEATURE_FLAG=oss | ||
- AGENTA_TEMPLATE_REPO=agentaai/templates_v2 | ||
- POSTHOG_API_KEY=phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7 | ||
|
@@ -60,6 +62,8 @@ services: | |
depends_on: | ||
mongo: | ||
condition: service_healthy | ||
postgres: | ||
condition: service_healthy | ||
restart: always | ||
|
||
agenta-web: | ||
|
@@ -140,27 +144,72 @@ services: | |
command: > | ||
celery -A agenta_backend.main.celery_app worker --concurrency=1 --loglevel=INFO | ||
environment: | ||
- POSTGRES_URI=postgresql+asyncpg://username:password@postgres:5432/agenta_oss | ||
- MONGODB_URI=mongodb://username:password@mongo:27017 | ||
- REDIS_URL=redis://redis:6379/0 | ||
- CELERY_BROKER_URL=amqp://guest@rabbitmq// | ||
- CELERY_RESULT_BACKEND=redis://redis:6379/0 | ||
- FEATURE_FLAG=oss | ||
volumes: | ||
- ./agenta-backend/agenta_backend:/app/agenta_backend | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
depends_on: | ||
- mongo | ||
- postgres | ||
- rabbitmq | ||
- redis | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
networks: | ||
- agenta-network | ||
|
||
postgres: | ||
image: postgres:16.2 | ||
container_name: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_USER: username | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: agenta_oss | ||
ports: | ||
- "5432:5432" | ||
networks: | ||
- agenta-network | ||
volumes: | ||
- postgresdb-data:/var/lib/postgresql/data/ | ||
- ./docker-assets/postgres/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
pgadmin: | ||
image: dpage/pgadmin4 | ||
restart: always | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: "[email protected]" | ||
PGADMIN_DEFAULT_PASSWORD: "password" | ||
PGADMIN_SERVER_HOST: "postgres" | ||
PGADMIN_SERVER_PORT: 5432 | ||
PGADMIN_SERVER_USER: "username" | ||
PGADMIN_SERVER_PASSWORD: "password" | ||
PGADMIN_SERVER_DB: agenta_oss | ||
ports: | ||
- "5050:80" | ||
networks: | ||
- agenta-network | ||
volumes: | ||
- pgadmin-data:/var/lib/pgadmin | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
|
||
networks: | ||
agenta-network: | ||
name: agenta-network | ||
|
||
volumes: | ||
mongodb_data: | ||
redis_data: | ||
postgresdb-data: | ||
pgadmin-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters