File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ services:
10
10
- postgres:/var/lib/postgresql/data
11
11
environment :
12
12
POSTGRES_PASSWORD : thispasswordisverysecure
13
+ POSTGRES_DB : paws
13
14
14
15
server :
15
16
container_name : paws-compose-server
@@ -23,7 +24,6 @@ services:
23
24
environment :
24
25
FLASK_ENV : development
25
26
26
-
27
27
client :
28
28
build : ./client
29
29
container_name : paws-compose-client
@@ -35,8 +35,12 @@ services:
35
35
- CHOKIDAR_USEPOLLING=true
36
36
stdin_open : true
37
37
38
+
38
39
# using named volumes fixs a windows docker bug relating to container permissions
39
40
# https://stackoverflow.com/questions/49148754/docker-container-shuts-down-giving-data-directory-has-wrong-ownership-error-wh
40
41
volumes :
41
42
postgres :
42
- src_archive:
43
+ src_archive :
44
+
45
+
46
+
Original file line number Diff line number Diff line change @@ -39,4 +39,6 @@ WORKDIR /app
39
39
40
40
RUN set FLASK_APP=server/app.py
41
41
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
You can’t perform that action at this time.
0 commit comments