-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.yml
132 lines (125 loc) · 3.41 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: "3"
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
local_file_data: {}
local_octoprint_data: {}
local_nsc_data: {}
services:
janus:
hostname: janus
image: bitsyai/janus:1.0.4
container_name: printnanny_janus_test
ports:
- "8188:8188"
- "7188:7188"
- "7088:7088"
- "8088:8088"
- "5000-5100:5000-5100/udp"
env_file:
- ./.envs/.local/.janus
volumes:
- ./compose/local/janus/etc:/etc/janus
django: &django # enables use of pdb
hostname: django
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
container_name: printnanny_webapp_django_test
depends_on:
- postgres12
- nats
- janus
- mailhog
volumes:
- .:/app:z
- local_file_data:/tmp:z
# prevent host machine .venv and node_modules from being included in container
# idea from: https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
- /app/.venv
- local_nsc_data:/var/lib/nats/nsc:z
environment:
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL}
DJANGO_SETTINGS_MODULE: config.settings.test
NKEYS_PATH: /var/lib/nats/nsc/keys
NSC_HOME: /var/lib/nats/nsc
NSC_STORE: /var/lib/nats/nsc/stores
STRIPE_TEST_PUBLIC_KEY: $STRIPE_TEST_PUBLIC_KEY}
STRIPE_TEST_SECRET_KEY: ${STRIPE_TEST_SECRET_KEY}
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports:
- "8080:8080"
- "8001:8001"
command:
- /start
mailhog:
image: mailhog/mailhog:v1.0.0
container_name: printnanny_webapp_local_mailhog_test
ports:
- "8025:8025"
firehose: &firehose
hostname: firehose
depends_on:
- django
- postgres12
- nats
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
container_name: printnanny_webapp_firehose_test
environment:
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL}
NKEYS_PATH: /var/lib/nats/nsc/keys
NSC_HOME: /var/lib/nats/nsc
NSC_STORE: /var/lib/nats/nsc/stores
DJANGO_SETTINGS_MODULE: config.settings.test
STRIPE_TEST_PUBLIC_KEY: ${STRIPE_TEST_PUBLIC_KEY}
STRIPE_TEST_SECRET_KEY: ${STRIPE_TEST_SECRET_KEY}
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
volumes:
- .:/app:z
- local_nsc_data:/var/lib/nats/nsc:z
command:
- python
- -m
- print_nanny_webapp.events.streams.firehose
postgres12:
hostname: postgres12
image: postgres:12.3
container_name: printnanny_webapp_postgres_test
volumes:
- local_postgres_data:/var/lib/postgresql/data:z
- local_postgres_data_backups:/backups:z
env_file:
- ./.envs/.local/.postgres
ports:
- "5432:5432"
redis:
# network_mode: "host"
hostname: redis
build:
context: .
dockerfile: ./compose/local/redis/Dockerfile
container_name: printnanny_webapp_redis_test
ports:
- "6379:6379"
nats:
hostname: nats
image: nats:2.8-alpine
container_name: printnanny_webapp_nats_test
volumes:
- .nats/:/etc/nats
command:
- -c
- /etc/nats/nats-server.conf
- --name
- localnats
ports:
- "4222:4222"
- "8443:8443"