set migrations volume

This commit is contained in:
deflax 2024-04-01 19:16:26 +03:00
parent 98936a066b
commit 1b1c4ec7da
3 changed files with 8 additions and 2 deletions

4
.gitignore vendored
View file

@ -17,6 +17,10 @@ data/dbadmin/*
data/pgadmin/* data/pgadmin/*
!data/pgadmin/.placeholder !data/pgadmin/.placeholder
# ignore forest volumes
data/forest/migrations/*
!data/forest/migrations/.placeholder
# ignore osmtile postgresql volume # ignore osmtile postgresql volume
data/osmtile/* data/osmtile/*
!data/osmtile/.placeholder !data/osmtile/.placeholder

View file

@ -31,6 +31,8 @@ services:
- "db" - "db"
build: ./src/forest build: ./src/forest
image: forest:latest image: forest:latest
volumes:
- "./data/forest/migrations:/app/migrations"
ports: ports:
- 5000:5000 - 5000:5000
env_file: env_file:

View file

@ -3,8 +3,8 @@
import os import os
from flask.cli import FlaskGroup from flask.cli import FlaskGroup
from forest import app, db from app import app, db
from forest.models import User from models import User
from flask_migrate import Migrate from flask_migrate import Migrate