-
Notifications
You must be signed in to change notification settings - Fork 45
/
docker-compose.commands.yml
128 lines (122 loc) · 4.05 KB
/
docker-compose.commands.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
version: '3.4'
# https://github.com/docker/compose/issues/1896 gives docker-compose's rationale
# for keeping our 'migrate' and 'test' runners outside of docker-compose.yml.
services:
migrate: &migrate
image: flyway/flyway:7.7.0-alpine
volumes:
- ./flyway/conf:/flyway/conf
- ./flyway/sql:/flyway/sql
environment:
FLYWAY_USER: cjworkbench
FLYWAY_PASSWORD: cjworkbench
FLYWAY_URL: 'jdbc:postgresql://database/cjworkbench'
networks: [ 'dev' ]
depends_on: [ 'database' ]
command: [ 'migrate' ]
testmigrate:
<<: *migrate
environment:
FLYWAY_USER: cjworkbench
FLYWAY_PASSWORD: cjworkbench
FLYWAY_URL: 'jdbc:postgresql://testdatabase/cjworkbench'
networks: [ 'test' ]
depends_on: [ 'testdatabase' ]
develop-module:
build:
context: .
target: pydev
volumes:
- type: bind
source: ./
target: /app/
consistency: cached
- type: bind
source: ../${MODULE:-x}/
target: /${MODULE:-x}/
consistency: cached
security_opt:
- seccomp=docker/pyspawner-seccomp-profile.json
privileged: true
cap_add: [ SYS_ADMIN ] # for cjwkernel.kernel to overlay-mount chroots (on k8s we use an init container instead)
environment: &django-env
PYTHONUNBUFFERED: '1'
ASGI_THREADS: '3'
CJW_HELP_EMAIL: root@localhost
CJW_HOME_URL: 'http://localhost:8000'
CJW_DB_HOST: database
CJW_RABBITMQ_HOST: amqp://guest:guest@rabbitmq/
CJW_DB_PASSWORD: cjworkbench
CJW_SECRET_KEY: cjw-secret-key
TUS_CREATE_UPLOAD_URL: http://tusd/files/
AWS_ACCESS_KEY_ID: minio_access
AWS_SECRET_ACCESS_KEY: minio_secret
AWS_S3_ENDPOINT: http://minio:9000
S3_BUCKET_NAME_PATTERN: "dev-%s"
networks: [ 'dev' ]
depends_on: [ 'database', 'rabbitmq', 'minio' ]
pydev:
# Run Python commands without depending on other services
build:
context: .
target: pydev
volumes:
- type: bind
source: ./
target: /app/
consistency: cached
security_opt:
- seccomp=docker/pyspawner-seccomp-profile.json
privileged: true
cap_add:
- SYS_ADMIN # for cjwkernel.kernel to overlay-mount chroots (on k8s we use an init container instead)
- NET_ADMIN # for pyspawner to create new network namespace without access to private network
environment:
<<: *django-env
networks: [ 'dev' ]
unittest:
# It'd be nice to use YAML anchors to copy these parameters ... but
# PyCharm's YAML parser seems to die when we use YAML anchors.
build:
context: .
target: pydev
volumes:
- type: bind
source: ./
target: /app/
consistency: cached
security_opt:
- seccomp=docker/pyspawner-seccomp-profile.json
privileged: true
cap_add:
- SYS_ADMIN # for cjwkernel.kernel to overlay-mount chroots (on k8s we use an init container instead)
- NET_ADMIN # for pyspawner to create new network namespace without access to private network
environment:
PYTHONUNBUFFERED: '1'
ASGI_THREADS: '3'
CJW_HELP_EMAIL: 'root@localhost'
CJW_HOME_URL: 'http://localhost:8000'
CJW_DB_PASSWORD: cjworkbench
CJW_SECRET_KEY: cjw-secret-key
AWS_ACCESS_KEY_ID: minio_access
AWS_SECRET_ACCESS_KEY: minio_secret
TUS_CREATE_UPLOAD_URL: http://testtusd:8080/files
CJW_DB_HOST: testdatabase
CJW_RABBITMQ_HOST: amqp://guest:guest@testrabbitmq/
AWS_S3_ENDPOINT: http://testminio:9000
networks: [ 'test' ]
depends_on: [ 'testdatabase', 'testrabbitmq', 'testminio', 'testtusd' ]
entrypoint: 'bin/unittest-entrypoint.sh'
stripe:
image: stripe/stripe-cli:v1.5.2
networks: [ 'dev' ]
depends_on: [ 'frontend' ]
environment:
STRIPE_DEVICE_NAME: workbench-dev
env_file:
- stripe.env # STRIPE_API_KEY
command: [
'listen',
'--forward-to', 'http://frontend:8000/stripe/webhook',
'--events', 'checkout.session.completed,customer.subscription.deleted,customer.subscription.updated'
]