-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
42 lines (39 loc) · 1.65 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
42 lines (39 loc) · 1.65 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
# The configs in this file will overwrite the configs that are defined in a corresponding Dockerfile.
# So some of these configs might not be necessary if they are already defined in a correspoding Dockerfile.
# In fact, some of the configs in this file might throw errors, but they won't throw errors in the Dockerfile
# (e.g. the `dev-server` config for `command: CODE_ENVIRONMENT="local" uvicorn main:app --reload --host=0.0.0.0`).
version: "3.7"
services:
dev-server:
# container_name: dev-server
build:
context: .
dockerfile: ./server/Dockerfile.server.dev
volumes:
- ./server:/app/server
working_dir: /app/server
# command: CODE_ENVIRONMENT="local" uvicorn main:app --reload --host=0.0.0.0
# Documentation about `ports` config: https://docs.docker.com/compose/compose-file/compose-file-v3/#ports
ports:
- target: 8000
published: 8000
dev-client:
# container_name: dev-client
build:
context: .
dockerfile: ./client/Dockerfile.client.dev
volumes:
- ./client:/app/client
working_dir: /app/client
# You have to run `npm install` to install the dependencies and `npm run dev` to start the client-side code.
# You have to use bash to execute the command otherwise you will get errors.
command: bash -c "npm install && npm run dev"
ports:
# - target: 3000
# published: 3000
- "3000:3000"
# Configuring the ports "24678:24678" will prevent the browser from constantly reloading.
# See https://github.com/sveltejs/kit/issues/1468 and https://github.com/sveltejs/kit/issues/1134.
- "24678:24678"
depends_on:
- dev-server