-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.base-dev.yml
95 lines (92 loc) · 2.51 KB
/
docker-compose.base-dev.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
version: "3.6"
services:
app:
build:
context: .
depends_on:
migratedb:
condition: service_completed_successfully
createbuckets:
condition: service_completed_successfully
db:
condition: service_started
volumes:
- ./src:/app/src
- ./prisma:/app/prisma
ports:
- 3000:3000
environment:
- SECRET=secret
- S3_URI=http://minio:9000
- S3_ACCESS_KEY=minio-username
- S3_SECRET_KEY=minio-password
db:
image: postgres:14
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
migratedb:
image: app:latest
command:
[
"./wait-for-it/wait-for-it.sh",
"db:5432",
"--",
"npx",
"prisma",
"db",
"push",
]
build:
context: .
target: development
depends_on:
db:
condition: service_started
studio:
image: app:latest
command:
[
"./wait-for-it/wait-for-it.sh",
"db:5432",
"--",
"npx",
"prisma",
"studio",
]
build:
context: .
target: development
ports:
- 5555:5555
depends_on:
db:
condition: service_started
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- "MINIO_ROOT_USER=minio-username"
- "MINIO_ROOT_PASSWORD=minio-password"
command: server /export --console-address ":9001"
createbuckets:
image: minio/mc
links:
- "minio"
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 5;
/bin/mc config host add local http://minio:9000 minio-username minio-password;
/bin/mc mb --ignore-existing local/musics;
/bin/mc anonymous set download local/musics;
/bin/mc mb --ignore-existing local/covers;
/bin/mc anonymous set download local/covers;
/bin/mc mb --ignore-existing local/avatars;
/bin/mc anonymous set download local/avatars;
exit 0;"