-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
38 lines (32 loc) · 1.16 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
38 lines (32 loc) · 1.16 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
# for development environment - uses local .env.development file and mounts backend code for live updates
# specify the version of docker-compose
version: "3.8"
# define the services/containers to be run
services:
# define the api service/container
api:
# specify the ports to expose for the api service
# the first number is the port on the host machine
# the second number is the port inside the container
ports:
- "4013:4013"
command: sh -c "npm install && npm run dev"
volumes:
- ./backend:/app
# specify environment variables for the api service
# these environment variables will be read from the .env file
env_file:
- .env.development
# establish docker compose watch mode for the api service
develop:
# specify the files to watch for changes
watch:
# watch package.json and package-lock.json for changes
- path: ./package.json
action: rebuild
- path: ./package-lock.json
action: rebuild
# watch backend source files and sync changes with the container in real time
- path: ./src
target: /app
action: sync