Skip to content

Commit

Permalink
make volumes for database
Browse files Browse the repository at this point in the history
  • Loading branch information
norali12 committed Sep 23, 2024
1 parent 5c76aeb commit b20d967
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ services:
- POSTGRES_DB=microcentral
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data

backend:
profiles: # will start only if `docker-compose --profile prod up` is used
Expand Down Expand Up @@ -79,3 +81,5 @@ networks:
backend:
driver: bridge

volumes:
postgres_data:
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
# Run migrations to create tables
#poetry run python app/manager.py init_db
echo "Running migrations..."
poetry run alembic revision -m "Initial migration"
poetry run alembic revision --autogenerate -m "Initial migration"
echo "Revision created"
poetry run alembic upgrade head
echo "Migrations complete"
Expand Down

0 comments on commit b20d967

Please sign in to comment.