Skip to content

Commit

Permalink
fixed flask migration failed if db not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
soaibsafi committed Jul 4, 2024
1 parent 94c5e68 commit e986baf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
CORS(app, supports_credentials=True)
cache = Cache(app)
Compress(app)
db.create_all()
app.register_blueprint(routes)
app.register_blueprint(authentication)
login_manager = LoginManager()
login_manager.init_app(app)
db.create_all()

@login_manager.user_loader
def load_user(user_id):
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
build:
context: ./frontend
args:
NODE_ENV: development
VITE_FMP_API_URL: http://localhost:8000/api
container_name: fmp-frontend
env_file:
Expand Down
6 changes: 1 addition & 5 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
FROM node:20-alpine
ARG NODE_ENV=production
ARG VITE_FMP_API_URL

ENV NODE_ENV=${NODE_ENV}
ENV VITE_FMP_API_URL=${VITE_FMP_API_URL}

WORKDIR /app
COPY package.json .
COPY package*.json .
RUN npm install
COPY . .
RUN npm run build
Expand Down

0 comments on commit e986baf

Please sign in to comment.