Skip to content

Commit ffb3042

Browse files
committed
Moved migration run from dockerfile to workflow file
1 parent fbfb360 commit ffb3042

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/deploy-dev.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ jobs:
4040
source tags
4141
export IMAGE_TAG=${{ steps.vars.outputs.sha_short }}
4242
cd docker-compose
43-
docker stack rm the-stack
44-
sleep 20s
45-
sudo systemctl stop nginx
43+
docker pull cornellappdev/uplift-dev:$IMAGE_TAG
44+
# temporary container to run migrations
45+
docker run --rm --env-file uplift.env cornellappdev/uplift-dev:$IMAGE_TAG flask --app migrations db upgrade
4646
sudo systemctl restart nginx
4747
docker stack deploy -c docker-compose.yml the-stack --with-registry-auth
48-
sleep 60s
49-
yes | docker system prune -a

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ COPY . .
66
ENV MAX_CONCURRENT_PIP=4
77
RUN pip3 install --upgrade pip
88
RUN pip3 install --exists-action w -r requirements.txt
9-
CMD flask --app migrations db upgrade && python3 app.py
9+
CMD python3 app.py

0 commit comments

Comments
 (0)