-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
192 lines (187 loc) · 5.16 KB
/
Copy pathdocker-compose.yml
File metadata and controls
192 lines (187 loc) · 5.16 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
volumes:
consuldata:
vaultdata:
seaweedfsdata:
postgresdata:
redisdata:
services:
db:
image: postgres:16
restart: always
environment:
POSTGRES_DB: cabotage_dev
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 3s
retries: 15
ports:
- "5432:5432"
volumes:
- postgresdata:/var/lib/postgresql/data/
- ./docker-compose/db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
redis:
image: redis:7
restart: always
ports:
- "6379:6379"
volumes:
- redisdata:/var/lib/redis/
consul:
image: hashicorp/consul:1.20
restart: always
environment:
CONSUL_CLIENT_INTERFACE: eth0
ports:
- "8500:8500"
volumes:
- consuldata:/consul/data
vault:
image: hashicorp/vault:1.18
restart: always
entrypoint: /bin/sh
command: /etc/vault/entry.sh
stop_signal: SIGINT
environment:
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
VAULT_DEV_ROOT_TOKEN_ID: deadbeef-dead-beef-dead-beefdeadbeef
ports:
- "8200:8200"
cap_add:
- IPC_LOCK
volumes:
- vaultdata:/vault/file
- ./docker-compose/vault:/etc/vault
links:
- db
registry:
image: registry:3
restart: always
command: ["/etc/docker/registry-local/config.yml"]
environment:
REGISTRY_STORAGE_S3_ACCESSKEY: SEAWEEDFS_ACCESS_KEY
REGISTRY_STORAGE_S3_SECRETKEY: SEAWEEDFS_SECRET_KEY
REGISTRY_STORAGE_S3_REGION: us-east-1
REGISTRY_STORAGE_S3_REGIONENDPOINT: http://seaweedfs:8333
REGISTRY_STORAGE_S3_BUCKET: cabotage-registry
REGISTRY_STORAGE_S3_SECURE: "false"
REGISTRY_STORAGE_S3_V4AUTH: "true"
REGISTRY_STORAGE_S3_CHUNKSIZE: 5242880
REGISTRY_STORAGE_S3_FORCEPATHSTYLE: "true"
REGISTRY_STORAGE_DELETE_ENABLED: true
ports:
- "5001:5001"
volumes:
- ./docker-compose/registry:/etc/docker/registry-local
cabotage-buildkitd:
image: moby/buildkit:v0.28.0-rootless
command: --addr tcp://0.0.0.0:1234
restart: always
ports:
- "1234:1234"
privileged: true
volumes:
- ./docker-compose/buildkitd:/home/user/.config/buildkit
seaweedfs:
image: chrislusf/seaweedfs
environment:
- AWS_ACCESS_KEY_ID=SEAWEEDFS_ACCESS_KEY
- AWS_SECRET_ACCESS_KEY=SEAWEEDFS_SECRET_KEY
command: mini -dir=/data -ip=seaweedfs
ports:
- "9333:9333"
- "8888:8888"
- "8333:8333"
- "9340:9340"
- "23646:23646"
tmpfs:
- /tmp
volumes:
- seaweedfsdata:/data
bucket-creator:
image: chrislusf/seaweedfs
depends_on:
- seaweedfs
entrypoint:
- /bin/sh
- -c
- |
# Wait for filer to start
sleep 5;
echo "s3.bucket.create -name cabotage-registry" | /usr/bin/weed shell -master=seaweedfs:9333 -filer=seaweedfs:8888
static:
image: oven/bun:1-slim
working_dir: /app
command: sh -c "bun install && bunx tailwindcss -i cabotage/client/src/tailwind.css -o cabotage/client/static/tailwind.css --watch=always"
volumes:
- .:/app:z
base:
build:
context: .
args:
DEVEL: yes
image: cabotage-app:docker-compose
environment: &base_environment
# Application configuration
- CABOTAGE_BCRYPT_LOG_ROUNDS=4
- CABOTAGE_DEBUG=True
- CABOTAGE_DEBUG_TB_ENABLED=True
- CABOTAGE_KUBERNETES_CONTEXT=minikube
- CABOTAGE_KUBERNETES_ENABLED=False
- CABOTAGE_SECURITY_CONFIRMABLE=False
- CABOTAGE_SQLALCHEMY_DATABASE_URI=postgresql+psycopg://postgres@db/cabotage_dev
- CABOTAGE_TESTING=True
- CABOTAGE_VAULT_TOKEN=deadbeef-dead-beef-dead-beefdeadbeef
- C_FORCE_ROOT=1
- FLASK_APP=cabotage.server.wsgi
- KUBECONFIG=/var/run/kube/config
volumes:
- .:/opt/cabotage-app/src:z
cabotage-app:
image: cabotage-app:docker-compose
command: hupper -m gunicorn.app.wsgiapp -c gunicorn.conf.py -w 4 --threads 100 -b 0.0.0.0:8000 cabotage.server.wsgi:app
environment: *base_environment
env_file:
- path: .env
required: false
volumes:
- .:/opt/cabotage-app/src:z
- $HOME/.kube:/var/run/kube
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
links:
- db
- redis
- vault
cabotage-app-worker-beat:
image: cabotage-app:docker-compose
command: hupper -m celery -A cabotage.celery.worker.celery_app beat -l info -S redbeat.RedBeatScheduler
environment: *base_environment
env_file:
- path: .env
required: false
volumes:
- .:/opt/cabotage-app/src:z
links:
- db
- redis
cabotage-app-worker:
image: cabotage-app:docker-compose
command: hupper -m celery -A cabotage.celery.worker.celery_app worker --concurrency=4 -E --loglevel=INFO
environment: *base_environment
env_file:
- path: .env
required: false
# worker runs buildkitd-daemonless directly to simulate cache isolation locally
privileged: true
volumes:
- .:/opt/cabotage-app/src:z
- $HOME/.kube:/var/run/kube
links:
- db
- redis
- vault