-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.dev.yml
38 lines (36 loc) · 1.21 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
version: "3"
services:
db:
image: postgres
environment:
- POSTGRES_DB=zosia
- POSTGRES_USER=zosia
- POSTGRES_PASSWORD=zosia
# Container with web application
web:
build:
context: ./app
dockerfile: Dockerfile
target: dev
image: zosia_dev
# Main process in container
command: sleep infinity
# docker volumes - Host:Container
volumes:
- ./app/server:/code/server
- ./app/client:/code/client
- ./app/static:/code/static
# Node modules installed in container need to be visible in host for local development, IDEs etc.
# Especially the _reactivated module which is generated on `python manage.py runserver` and contains types for Typescript
- ./app/node_modules:/code/node_modules
# Package.json and lock file are mounted to allow installing node modules from within the container for conveniance
- ./app/package.json:/code/package.json
- ./app/package-lock.json:/code/package-lock.json
# Tailwind config is mounted to allow changing themes without rebuilding the container
- ./app/tailwind.config.ts:/code/tailwind.config.ts
ports:
- "8000:8000"
depends_on:
- db
links:
- db