forked from captableinc/captable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
101 lines (96 loc) · 2.14 KB
/
compose.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
name: captable
services:
app:
build:
target: deps
context: .
dockerfile: ./docker/Dockerfile
container_name: captable-app
depends_on:
- pg
- smtp
- minio
restart: always
ports:
- 3000:3000
env_file:
- ".env"
working_dir: /app
command: [/bin/sh, -c, "pnpm install && pnpm dev"]
volumes:
- .:/app
- /app/node_modules
- /app/.next
- /app/.pnpm-store
studio:
build:
target: deps
context: .
dockerfile: ./docker/Dockerfile
container_name: captable-studio
depends_on:
- pg
- smtp
- minio
restart: always
ports:
- 5555:5555
env_file:
- ".env"
working_dir: /app
command: [/bin/sh, -c, "pnpm install && pnpm db:studio"]
volumes:
- .:/app
- /app/node_modules
- /app/.next
- /app/.pnpm-store
pg:
image: postgres:15
container_name: captable-database
environment:
- POSTGRES_USER=captable
- POSTGRES_PASSWORD=password
- POSTGRES_DB=captable
- POSTGRES_EXTENSIONS=pgcrypto
ports:
- 54321:5432
volumes:
- postgres:/var/lib/postgresql/data
smtp:
image: axllent/mailpit
container_name: captable-smtp
ports:
- 8025:8025
- 1025:1025
minio:
image: minio/minio
container_name: captable-minio
ports:
- 9002:9002
- 9001:9001
volumes:
- minio:/data
environment:
- MINIO_ROOT_USER=captable
- MINIO_ROOT_PASSWORD=password
entrypoint: sh
command: -c 'minio server /data --console-address ":9001" --address ":9002"'
# minio client - is expected to be run once to setup minio buckets. It'll exit 0 after setup
mc:
image: minio/mc
container_name: captable-minio-client
depends_on:
- minio
entrypoint: sh
command: |
-c "
sleep 10;
mc alias set myminio http://minio:9002 captable password;
mc mb myminio/captable-private-bucket;
mc mb myminio/captable-public-bucket;
mc policy set public myminio/captable-public-bucket;
exit 0;
"
volumes:
minio:
postgres: