-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
104 lines (98 loc) · 1.97 KB
/
docker-compose.yaml
File metadata and controls
104 lines (98 loc) · 1.97 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
name: xcontest-api
services:
db:
image: postgres:18.2-alpine
container_name: database
restart: always
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
PGDATA: /var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 5s
retries: 10
profiles:
- base
- dev
- prod
api:
build:
context: .
target: prod
container_name: api
restart: always
environment:
NODE_ENV: production
ports:
- "3333:3333"
depends_on:
db:
condition: service_healthy
volumes:
- ./.env:/app/.env
profiles:
- prod
api-devel:
build:
context: .
target: dev
container_name: api-devel
restart: always
environment:
NODE_ENV: development
ports:
- "3333:3333"
depends_on:
db:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
profiles:
- dev
objectstore:
image: chrislusf/seaweedfs:latest
container_name: objectstore
restart: always
ports:
- "8333:8333"
- "8888:8888"
environment:
AWS_ACCESS_KEY_ID: ${S3_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${S3_SECRET}
volumes:
- weedstore:/data
profiles:
- base
- dev
- prod
command: server -s3 -dir=/data
redis:
image: redis:8.6-trixie # This has no password!!! Must be set in config file.
container_name: redis
restart: always
ports:
- "6379:6379"
volumes:
- redisdata:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 5s
retries: 10
profiles:
- base
- dev
- prod
volumes:
pgdata:
weedstore:
redisdata: