-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (45 loc) · 1.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (45 loc) · 1.49 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
43
44
45
46
version: '3'
services:
nginx:
restart: always
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- '4000:80'
postgres:
image: 'postgres:latest' #dla tego serwisu nie mamy Dockerfile, po prostu zciągamy z registry
redis:
image: 'redis:latest'
api:
build:
dockerfile: Dockerfile.dev # tu nie podaje się ścieżki!
context: ./server # a to jest miejsce, gdzie to wszystko potrzebne znajduje się
volumes:
- "\\app\\node_modules" # tego folderu nie poddawaj przemapowywaniu
- ".\\server:\\app" # jak chcesz coś z /app to szukaj w ./server u hosta
environment:
- REDIS_HOST=redis # to specyfika docker-compose, ponieważ jest to uprzednio zdefiniowany serwis, to docker-compose ustali szczególoiki
- REDIS_PORT=6379 # z dokumentacji image'u redis
- PGUSER=postgres
- PGHOST=postgres # znowuż specyfika docker-compose - on ustali szczególiki tego serwwisu
- PGDATABASE=postgres # z dokumentacji image'u - defaultowa db
- PGPASSWORD=postgres_password
- PGPORT=5432
client:
build:
dockerfile: Dockerfile.dev
context: ./client
volumes:
- "\\app\\node_modules"
- ".\\client:\\app"
worker:
build:
dockerfile: Dockerfile.dev
context: ./worker
volumes:
- "\\app\\node_modules"
- ".\\worker:\\app"
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379