Skip to content

Commit 9d7871d

Browse files
feat: Dedicated Migration Container (#383)
1 parent 37420ee commit 9d7871d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docker-compose.dev.yml

+14
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,17 @@ services:
376376
ports:
377377
- 9000:9000
378378
- 8123:8123
379+
380+
migrate:
381+
container_name: lago-migrate_dev
382+
image: api_dev
383+
depends_on:
384+
- db
385+
command: ["./scripts/start.migrate.dev.sh"]
386+
build:
387+
context: ./api
388+
dockerfile: $LAGO_PATH/api/Dockerfile.dev
389+
volumes:
390+
- $LAGO_PATH/api:/app:delegated
391+
environment:
392+
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}

docker-compose.yml

+15
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,18 @@ services:
290290

291291
pdf:
292292
image: getlago/lago-gotenberg:7.8.2
293+
294+
migrate:
295+
container_name: lago-migrate
296+
image: getlago/api:v1.8.1
297+
depends_on:
298+
- db
299+
command: ["./scripts/start.migrate.sh"]
300+
volumes:
301+
- lago_storage_data:/app/storage
302+
environment:
303+
- RAILS_ENV=production
304+
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
305+
- RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
306+
- LAGO_RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
307+
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}?search_path=${POSTGRES_SCHEMA:-public}

0 commit comments

Comments
 (0)