-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
76 lines (76 loc) · 1.89 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: "3.9"
networks:
default:
name: todo_api
services:
db:
image: "postgres"
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: todo_api_rw
POSTGRES_PASSWORD: hello_rust
POSTGRES_DB: todo_api
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U todo_api_rw -d todo_api" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./database/docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
todo_api_rust:
depends_on:
db:
condition: service_healthy
image: todo-api-rust:local
container_name: todo_api_rust_local
build:
context: ./rust
dockerfile: DockerFile
ports:
- 8080:8080
environment:
- DATABASE_URL=postgres://todo_api_rw:hello_rust@db/todo_api
todo_api_dotnet:
depends_on:
db:
condition: service_healthy
image: todo-api-dotnet:local
container_name: todo_api_net_local
build:
context: ./dotnet
dockerfile: DockerFile
ports:
- 80:80
environment:
- DATABASE_URL=host=db;database=todo_api;username=todo_api_rw;password=hello_rust;command timeout=0;connection idle lifetime=10;maximum pool size=10;
todo_api_node:
depends_on:
db:
condition: service_healthy
image: todo-api-node:local
container_name: todo_api_node_local
build:
context: ./nodejs
dockerfile: DockerFile
ports:
- 1337:1337
environment:
- DATABASE_URL=postgres://todo_api_rw:hello_rust@db:5432/todo_api
todo_api_go:
depends_on:
db:
condition: service_healthy
image: todo-api-go:local
container_name: todo_api_go_local
build:
context: ./go
dockerfile: Dockerfile
ports:
- 8081:8081
environment:
- DB_HOST=db
- DB_USER=todo_api_rw
- DB_PASSWORD=hello_rust
- DB_NAME=todo_api