-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
39 lines (39 loc) · 1.14 KB
/
docker-compose.dev.yml
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
version: '3.8'
services:
redis:
image: redis/redis-stack:latest
container_name: rediscontainer
ports:
- "6379"
- "8001:8001"
networks:
- backend
volumes:
- ./redis_data/:/data
expose:
- 6379
express-server:
build:
context: . # path to Dockerfile to build
target: buildstage # targetStage in the Dockerfile
volumes:
- .:/usr/src/app
- /usr/src/app/.pnpm-store # is only here to prevent syncing with the host machine
- /usr/src/app/node_modules # is only here to prevent syncing with the host machine (this hack works because this path is more specific than /usr/src/app)
environment:
- API_SERVER_PORT=4000
- REDIS_TEST_HOST='127.0.0.1'
- REDIS_TEST_PORT=6380
- REDIS_HOST=rediscontainer
- REDIS_PORT=6379
- NODE_OPTIONS='--experimental-vm-modules'
ports: # port_on_host_machine:port_on_container
- "4000:4000"
- "9229:9229" # for debugging
networks:
- backend
depends_on:
- redis
command: pnpm run dev # overrides the RUN command of the targetStage in the Dockerfile
networks:
backend: