new file: Dockerfile
new file: Makefile new file: database-migration/Dockerfile new file: database-migration/data.db new file: database-migration/db_migration.py new file: database-migration/migration.py new file: database-migration/requirements.txt new file: docker-compose.migration.yml new file: docker-compose.yml new file: main.py new file: requirements.txt
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:15
|
||||
environment:
|
||||
- DB_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- /srv/data/db/services/authentication:/var/lib/postgresql/data
|
||||
migration:
|
||||
build: database-migration
|
||||
image: python:3.11-slim
|
||||
environment:
|
||||
- DB_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- db
|
||||
command: python3 db_migration_test1.py
|
||||
Reference in New Issue
Block a user