File tree Expand file tree Collapse file tree 3 files changed +25
-22
lines changed Expand file tree Collapse file tree 3 files changed +25
-22
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pip3 install -r requirements.txt
19
19
20
20
## Development
21
21
22
- Run dependencies (Montagu API and DB, Proxy, Packit and a local Redis message queue in docker) with ` scripts/run-dependencies.sh `
22
+ Run dependencies (Montagu API and DB, Proxy, Packit and a local Redis message queue in docker) with ` scripts/run-dev- dependencies.sh `
23
23
24
24
Dependencies also include a fake smtp server run from a [ docker image] ( https://hub.docker.com/r/reachfive/fake-smtp-server )
25
25
to enable development and testing of email functionality. You can see a web front end for the emails 'sent' via this server
Original file line number Diff line number Diff line change @@ -56,10 +56,7 @@ docker run -d \
56
56
$MONTAGU_PROXY_TAG 443 localhost
57
57
58
58
# give packit api some time to migrate the db...
59
- # TODO: poll rather than ridiculous sleep
60
- sleep 60
61
- docker logs montagu-packit-db
62
- docker logs montagu-packit-api
59
+ sleep 5
63
60
64
61
# create roles to publish to...
65
62
docker exec -i montagu-packit-db psql -U packituser -d packit --single-transaction << EOF
@@ -75,20 +72,4 @@ DISPLAY_NAME='Test User'
75
72
ROLE=' ADMIN'
76
73
docker exec montagu-packit-db create-preauth-user --username " $USERNAME " --email " $EMAIL " --displayname " $DISPLAY_NAME " --role " $ROLE "
77
74
78
- # From now on, if the user presses Ctrl+C we should teardown gracefully
79
- function cleanup() {
80
- docker container stop reverse-proxy
81
- docker container rm reverse-proxy -v
82
- # Same exit code issue for packit stop as packit start....
83
- set +e
84
- hatch env run -- packit stop ./scripts
85
- set -e
86
- # remove db volume manually rather than --volumes flag to packit, to avoid requiring user confirmation
87
- docker volume rm montagu_packit_db montagu_orderly_library montagu_outpack_volume montagu_orderly_logs
88
- docker compose --project-name montagu down -v
89
- }
90
- trap cleanup EXIT
91
-
92
- # Wait for Ctrl+C
93
- echo " Ready to use. Press Ctrl+C to teardown."
94
- sleep infinity
75
+
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -ex
3
+
4
+ ./scripts/run-dependencies.sh
5
+
6
+ # From now on, if the user presses Ctrl+C we should teardown gracefully
7
+ function cleanup() {
8
+ docker container stop reverse-proxy
9
+ docker container rm reverse-proxy -v
10
+ # Same exit code issue for packit stop as packit start....
11
+ set +e
12
+ hatch env run -- packit stop ./scripts
13
+ set -e
14
+ # remove db volume manually rather than --volumes flag to packit, to avoid requiring user confirmation
15
+ docker volume rm montagu_packit_db montagu_orderly_library montagu_outpack_volume montagu_orderly_logs
16
+ docker compose --project-name montagu down -v
17
+ }
18
+ trap cleanup EXIT
19
+
20
+ # Wait for Ctrl+C
21
+ echo " Ready to use. Press Ctrl+C to teardown."
22
+ sleep infinity
You can’t perform that action at this time.
0 commit comments