-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 968 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (34 loc) · 968 Bytes
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
services:
postgres:
image: postgres:16-alpine
container_name: codeftc-postgres
environment:
POSTGRES_USER: codeftc
POSTGRES_PASSWORD: codeftc_dev
POSTGRES_DB: codeftc
ports:
- "5432:5432"
volumes:
- codeftc_postgres_data:/var/lib/postgresql/data
nextjs:
build:
context: .
dockerfile: Dockerfile
container_name: codeftc-nextjs
ports:
- "3000:3000"
env_file:
- .env.docker
environment:
EXEC_TMP_DIR: /tmp/codeftc-exec
volumes:
# Docker-out-of-Docker: give the container access to the host Docker daemon
- /var/run/docker.sock:/var/run/docker.sock
# Shared exec temp dir — MUST be the same path on host and in container
# so the host Docker daemon can bind-mount it into sandbox containers
- /tmp/codeftc-exec:/tmp/codeftc-exec
depends_on:
postgres:
condition: service_started
volumes:
codeftc_postgres_data: