-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (54 loc) · 1.22 KB
/
docker-compose.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: "3"
services:
migrate:
restart: on-failure
build: ./migrator
depends_on:
- postgres
links:
- postgres
postgres:
build: ./db
ports:
- 7557:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=docker
- POSTGRES_DB=postgres
- DATABASE_HOST=postgres
volumes:
- data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
nginx:
restart: always
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- "3050:80"
api:
depends_on:
- postgres
restart: on-failure
build:
dockerfile: Dockerfile.dev
context: ./server
environment:
# - BIND_ADDR=:5000
# - LOG_LEVEL=debug
- DATABASE_URL=user=postgres password=docker host=postgres dbname=postgres port=5432 sslmode=disable
- TEST_DATABASE_URL=user=postgres password=docker host=postgres dbname=restapi_test port=5432 sslmode=disable
client:
# restart: always
build:
dockerfile: Dockerfile.dev
context: ./client
volumes:
- /app/node_modules
- ./client:/app
volumes:
data: