This repository was archived by the owner on Apr 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +81
-6
lines changed Expand file tree Collapse file tree 5 files changed +81
-6
lines changed Original file line number Diff line number Diff line change 9
9
HUME_BROKER_USERNAME = os .environ ["BROKER_USER" ]
10
10
HUME_BROKER_PASSWORD = os .environ ["BROKER_PASS" ]
11
11
12
- HUME_BROKER_VHOST = int ( os .environ ["BROKER_VHOST" ])
12
+ HUME_BROKER_VHOST = os .environ ["BROKER_VHOST" ]
13
13
HUME_BROKER_HOST = os .environ ["BROKER_HOST" ]
14
14
HUME_BROKER_PORT = int (os .environ ["BROKER_PORT" ])
15
15
Original file line number Diff line number Diff line change
1
+ # This compose file is intended for local tests to verify any changes to the
2
+ # docker images locally and manually. Useful for deploying a local test cluster
3
+ # to try things out in and to check on configuration changes.
4
+ version : ' 3.8'
5
+
6
+ services :
7
+
8
+ backend :
9
+ image : local/hint-backend:latest
10
+ environment :
11
+ - BROKER_USER=hint
12
+ - BROKER_PASS=hintpw123
13
+ - BROKER_VHOST=hub
14
+ - BROKER_HOST=rabbitmq
15
+ - BROKER_PORT=5672
16
+ - SECRET_KEY=3jk12hklöe41j2hrkl21jhrilkh12kl12rh###2klrjh12rkl12hjr1kl2jrh12klj12hrkl12hio12ury1i2fh12kdasdas
17
+ - PG_USER=admin
18
+ - PG_PASS=admin
19
+ - PG_HOST=postgres
20
+ - PG_PORT=5432
21
+ - REDIS_HOST=redis
22
+ - REDIS_PORT=6379
23
+ - DJANGO_SETTINGS_MODULE=backend.settings.prod
24
+ expose :
25
+ - 32000
26
+ depends_on :
27
+ - rabbitmq
28
+ - redis
29
+ - postgres
30
+
31
+ ingress :
32
+ image : local/hint-ingress:latest
33
+ ports :
34
+ - ' 8080:80'
35
+ depends_on :
36
+ - backend
37
+
38
+ postgres :
39
+ image : postgres:15.0
40
+ environment :
41
+ - POSTGRES_USER=admin
42
+ - POSTGRES_PASSWORD=admin
43
+ - POSTGRES_DB=hint
44
+ - PGDATA=/var/lib/postgresql/data/pgdata
45
+ volumes :
46
+ - postgres_volume:/var/lib/postgresql/data
47
+
48
+ redis :
49
+ image : redis:7.0.5
50
+
51
+ rabbitmq :
52
+ image : local/hint-rabbitmq:latest
53
+ volumes :
54
+ - rabbitmq_volume:/var/lib/rabbitmq
55
+
56
+ volumes :
57
+ postgres_volume :
58
+ rabbitmq_volume :
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ services:
54
54
image : redis:7.0.5
55
55
56
56
rabbitmq :
57
- image : ghcr.io/open-home-iot/rabbitmq:3.11.1-management
57
+ image : ghcr.io/open-home-iot/hint- rabbitmq:latest
58
58
volumes :
59
59
- rabbitmq_volume:/var/lib/rabbitmq
60
60
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ cd "$HINT_PROJECT_ROOT" || exit 1
18
18
# 3. Collect static
19
19
# 4. Build ingress/fileserver container image
20
20
# 5. Build backend container image
21
+ # 6. Build rabbitmq image
21
22
22
23
#
23
24
# LETS GOOOOOO
@@ -34,7 +35,10 @@ rm -rf "$HINT_PROJECT_ROOT/backend/static/collectedstatic"
34
35
./manage.py collectstatic
35
36
36
37
# 4. Build ingress/fileserver container image
37
- docker build . -f docker/ingress.Dockerfile --tag hint-ingress
38
+ docker build . -f docker/ingress.Dockerfile --tag local/ hint-ingress:latest
38
39
39
40
# 5. Build backend container image
40
- docker build . -f docker/backend.Dockerfile --tag hint-backend
41
+ docker build . -f docker/backend.Dockerfile --tag local/hint-backend:latest
42
+
43
+ # 6. Build rabbitmq image
44
+ docker build . -f docker/rabbitmq.Dockerfile --tag local/hint-rabbitmq:latest
Original file line number Diff line number Diff line change 2
2
# NOTE! This scripts is ONLY meant to be run in the backend container, and
3
3
# won't work outside of there.
4
4
5
- ./manage.py migrate
5
+ echo " Applying database migrations"
6
+ while ! ./manage.py migrate
7
+ do
8
+ echo " Retrying migration in 2 seconds..."
9
+ sleep 2
10
+ done
11
+
12
+ echo " Creating initial user"
6
13
# createinitialuser creates a single superuser instance, but only if NO OTHER
7
14
# users exist, so it's safe to call on subsequent deployments.
8
- ./manage.py createinitialuser
15
+ while ! ./manage.py createinitialuser
16
+ do
17
+ echo " Retrying user creation in 2 seconds..."
18
+ sleep 2
19
+ done
20
+
21
+ echo " Running daphne"
9
22
daphne backend.asgi:application -b 0.0.0.0 -p 32000
You can’t perform that action at this time.
0 commit comments