-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
76 lines (74 loc) · 2.19 KB
/
docker-compose.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
version: "3.6"
services:
app:
build:
context: .
target: development
depends_on:
- db
volumes:
- ./src:/app/src
- ./prisma:/app/prisma
ports:
- 3000:3000
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/dev
- NODE_ENV=development
- SECRET=secret
- S3_URI=http://minio:9000
- S3_ACCESS_KEY=minio-username
- S3_SECRET_KEY=minio-password
db:
image: postgres:14
ports:
- 5432:5432
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: dev
migratedb:
image: app:latest
command:
[
"./wait-for-it/wait-for-it.sh",
"db:5432",
"--",
"npx",
"prisma",
"migrate",
"deploy",
]
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/dev
build:
context: .
target: development
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/avatars;
/bin/mc anonymous set download local/avatars;
/bin/mc mb --ignore-existing local/gallery;
/bin/mc anonymous set download local/gallery;
/bin/mc mb --ignore-existing local/backdrop;
/bin/mc anonymous set download local/backdrop;
/bin/mc mb --ignore-existing local/poster;
/bin/mc anonymous set download local/poster;
exit 0;"