-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (46 loc) · 1.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (46 loc) · 1.05 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
version: "3.9"
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: soljudge
POSTGRES_PASSWORD: soljudge
POSTGRES_DB: soljudge
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:7-alpine
ports:
- "6379:6379"
api:
build:
context: ./apps/api
dockerfile: Dockerfile
ports:
- "4000:4000"
environment:
DATABASE_URL: postgres://soljudge:soljudge@postgres:5432/soljudge
REDIS_URL: redis://redis:6379
SANDBOX_IMAGE: solidity-sandbox
PORT: 4000
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET must be set}
WEB_ORIGIN: http://localhost:3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock # so API can spawn sandbox containers
depends_on:
- postgres
- redis
web:
build:
context: ./apps/web
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: http://localhost:4000
depends_on:
- api
volumes:
pgdata: