Skip to content

Commit 3050764

Browse files
committed
feat(docker): add docker-compose.dev.yml file & update docker-compose.yml
1 parent 88ffdcb commit 3050764

2 files changed

Lines changed: 37 additions & 20 deletions

File tree

docker-compose.dev.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
backend:
3+
container_name: backend
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
target: backend
8+
restart: always
9+
env_file:
10+
- path: ./apps/backend/.env
11+
ports:
12+
- 3333:3333
13+
14+
frontend:
15+
container_name: frontend
16+
build:
17+
context: .
18+
dockerfile: Dockerfile
19+
target: frontend
20+
restart: always
21+
ports:
22+
- 3000:3000

docker-compose.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
services:
2-
backend:
3-
container_name: backend
4-
build:
5-
context: .
6-
dockerfile: Dockerfile
7-
target: backend
8-
restart: always
9-
env_file:
10-
- path: ./apps/backend/.env
2+
traefik:
3+
# The official v3 Traefik docker image
4+
image: traefik:v3.3
5+
container_name: traefik
6+
# Enables the web UI and tells Traefik to listen to docker
7+
command:
8+
- "--api.insecure=true"
9+
- "--providers.docker"
1110
ports:
12-
- 3333:3333
13-
14-
frontend:
15-
container_name: frontend
16-
build:
17-
context: .
18-
dockerfile: Dockerfile
19-
target: frontend
20-
restart: always
21-
ports:
22-
- 3000:3000
11+
# The HTTP port
12+
- "80:80"
13+
# The Web UI (enabled by --api.insecure=true)
14+
- "8080:8080"
15+
volumes:
16+
# So that Traefik can listen to the Docker events
17+
- /var/run/docker.sock:/var/run/docker.sock

0 commit comments

Comments
 (0)