-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
78 lines (71 loc) · 1.88 KB
/
compose.yaml
File metadata and controls
78 lines (71 loc) · 1.88 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
x-database-variables: &database-variables
POSTGRES_DB: ${POSTGRES_DB:-sourcetool_development}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
x-go-variables: &go-variables
GOMODCACHE: /gomodcache
services:
backend:
image: golang:1.24
command: bash -c "
go run ./devtools/cmd/db/main.go migrate &&
go run ./cmd/server"
ports:
- 8080:8080
depends_on:
- postgres
- redis
environment:
<<: [*database-variables, *go-variables]
env_file:
- .env
volumes:
- ./backend:/go/src/github.com/trysourcetool/sourcetool/backend
- gomodcache:/gomodcache
working_dir: /go/src/github.com/trysourcetool/sourcetool/backend
frontend:
image: node:20-alpine
command: sh -c "npm install --global corepack@latest && corepack enable && pnpm install --frozen-lockfile && pnpm dev:frontend --host 0.0.0.0 && pnpm dev:frontend:tsr"
ports:
- 5173:5173
depends_on:
- backend
env_file:
- .env
environment:
- NODE_ENV=development
- HOST=0.0.0.0
volumes:
- ./package.json:/app/package.json
- ./pnpm-lock.yaml:/app/pnpm-lock.yaml
- ./pnpm-workspace.yaml:/app/pnpm-workspace.yaml
- ./frontend:/app/frontend
- frontend_node_modules:/app/frontend/node_modules
working_dir: /app
nginx:
image: nginx:alpine
ports:
- 3000:80
volumes:
- ./nginx.dev.conf:/etc/nginx/conf.d/default.conf
depends_on:
- frontend
- backend
postgres:
image: postgres:15
platform: linux/amd64
ports:
- 5432:5432
environment:
<<: *database-variables
volumes:
- pgdata:/var/lib/postgresql/data:cached
redis:
image: redis:7-alpine
ports:
- 6379:6379
command: redis-server --requirepass password
volumes:
pgdata:
gomodcache:
frontend_node_modules: