Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (50 loc) · 1.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (50 loc) · 1.48 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
services:
postgres:
image: postgres:16-alpine
container_name: roughstack-postgres
restart: unless-stopped
environment:
POSTGRES_USER: roughstack
POSTGRES_PASSWORD: roughstack_dev
POSTGRES_DB: roughstack
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U roughstack -d roughstack"]
interval: 3s
timeout: 3s
retries: 20
web:
build:
context: .
dockerfile: Dockerfile.dev
container_name: roughstack-web
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://roughstack:roughstack_dev@postgres:5432/roughstack
NEXTAUTH_URL: http://localhost:3100
NODE_ENV: development
WATCHPACK_POLLING: "true"
BYTEARENA_ARENA_ROOTS: /roughstack-challenges/challenges
env_file:
- path: .env.local
required: false
ports:
- "3100:3100"
volumes:
- .:/app
- ../challenges:/roughstack-challenges:ro
# Anonymous volumes keep container-built artifacts from being shadowed by
# the host bind mount above. node_modules in particular must stay Linux-native.
- /app/node_modules
- /app/.next
# Lets the app shell out to the host Docker daemon to run execution containers
# when EXECUTION_MODE=local.
- /var/run/docker.sock:/var/run/docker.sock
volumes:
postgres_data: