Skip to content

Commit 67017c8

Browse files
authored
Merge pull request #186 from CodeForPhilly/180
Fix for 180: missing pdp_user_roles table
2 parents 7f61e15 + 7171fd0 commit 67017c8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- postgres:/var/lib/postgresql/data
1111
environment:
1212
POSTGRES_PASSWORD: thispasswordisverysecure
13+
POSTGRES_DB: paws
1314

1415
server:
1516
container_name: paws-compose-server
@@ -23,7 +24,6 @@ services:
2324
environment:
2425
FLASK_ENV: development
2526

26-
2727
client:
2828
build: ./client
2929
container_name: paws-compose-client
@@ -35,8 +35,12 @@ services:
3535
- CHOKIDAR_USEPOLLING=true
3636
stdin_open: true
3737

38+
3839
#using named volumes fixs a windows docker bug relating to container permissions
3940
#https://stackoverflow.com/questions/49148754/docker-container-shuts-down-giving-data-directory-has-wrong-ownership-error-wh
4041
volumes:
4142
postgres:
42-
src_archive:
43+
src_archive:
44+
45+
46+

src/server/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ WORKDIR /app
3939

4040
RUN set FLASK_APP=server/app.py
4141
RUN export FLASK_APP
42-
CMD alembic upgrade head ; python -m flask run --host=0.0.0.0
42+
43+
# This abomination ensures that the PG server has finished its restart cycle
44+
CMD echo "SLEEPING 10"; sleep 10; echo "WAKING"; alembic upgrade head ; python -m flask run --host=0.0.0.0

0 commit comments

Comments
 (0)