-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
142 lines (133 loc) · 3.95 KB
/
docker-compose.yaml
File metadata and controls
142 lines (133 loc) · 3.95 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
services:
###########################################################################
####### DATABASE #######
###########################################################################
postgres:
image: postgres:17-alpine
ports:
- "5432:5432"
volumes:
- ./volumes/postgres_api:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=gopie
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
- gopie
#########################################################################
##### GOPIE SERVICES #####
#########################################################################
gopie-migrate:
build:
context: ./server
dockerfile: Dockerfile.migrate
environment:
- GOOSE_DBSTRING=postgres://postgres:postgres@postgres:5432/gopie?sslmode=disable
- GOOSE_DRIVER=postgres
- GOOSE_MIGRATION_DIR=migrations
depends_on:
postgres:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- gopie
gopie-server:
build:
context: ./server
dockerfile: Dockerfile
env_file:
- ./config.env
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./volumes/duckdb:/home/gopie/dataful
networks:
- gopie
user: "0:0"
extra_hosts:
- "host.docker.internal:host-gateway"
command: >
sh -c "chown -R 1001:1001 /home/gopie/dataful &&
chmod -R 755 /home/gopie/dataful &&
su -s /bin/sh gopie -c 'cd /home/gopie && gopie serve'"
gopie-web:
build:
context: ./web
dockerfile: Dockerfile.prod
env_file:
- ./config.env
ports:
- "3000:3000"
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- gopie
###########################################################################
####### MINIO #######
###########################################################################
minio:
image: minio/minio
ports:
- "9000:9000"
- "9002:9002"
volumes:
- ./volumes/minio/data:/export
- ./volumes/minio/config:/root/.minio
environment:
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
networks:
- gopie
command: server -console-address :9002 /export
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
createbuckets:
image: minio/mc
depends_on:
minio:
condition: service_healthy
networks:
- gopie
entrypoint: >
/bin/sh -c "
echo 'Minio is up. Creating required buckets...' &&
/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin &&
/usr/bin/mc mb -p myminio/gopie &&
/usr/bin/mc mb -p myminio/downloads &&
/usr/bin/mc anonymous set public myminio/gopie/visualizations
"
#########################################################################
##### COMPANION #####
#########################################################################
companion:
image: transloadit/companion:sha-e80a7f7
ports:
- "3020:3020"
env_file:
- ./config.env
networks:
- gopie
depends_on:
- minio
#########################################################################
##### CHAT SERVER SERVICES #####
#########################################################################
include:
- ./chat-server/docker-compose-auth.yaml
networks:
gopie:
name: gopie
driver: bridge