Skip to content

Commit

Permalink
feat: Dedicated Migration Container (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomiguelpinto authored Jul 29, 2024
1 parent 37420ee commit 9d7871d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,17 @@ services:
ports:
- 9000:9000
- 8123:8123

migrate:
container_name: lago-migrate_dev
image: api_dev
depends_on:
- db
command: ["./scripts/start.migrate.dev.sh"]
build:
context: ./api
dockerfile: $LAGO_PATH/api/Dockerfile.dev
volumes:
- $LAGO_PATH/api:/app:delegated
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,18 @@ services:

pdf:
image: getlago/lago-gotenberg:7.8.2

migrate:
container_name: lago-migrate
image: getlago/api:v1.8.1
depends_on:
- db
command: ["./scripts/start.migrate.sh"]
volumes:
- lago_storage_data:/app/storage
environment:
- RAILS_ENV=production
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
- RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
- LAGO_RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}?search_path=${POSTGRES_SCHEMA:-public}

0 comments on commit 9d7871d

Please sign in to comment.