-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
54 lines (50 loc) · 1.04 KB
/
docker-compose.yaml
File metadata and controls
54 lines (50 loc) · 1.04 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
47
48
49
50
51
52
53
54
version: '3.7'
networks:
development:
driver: bridge
services:
api:
image: api:latest
build:
args:
PACKAGE: api
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
- TYPEORM_DATABASE=express
- TYPEORM_HOST=db
- TYPEORM_PASSWORD=masterkey
- TYPEORM_PORT=5432
- TYPEORM_SCHEMA=public
- TYPEORM_USERNAME=admin
ports:
- 3000:3000
depends_on:
db:
condition: service_healthy
networks:
- development
container_name: api
#########################
## Persistence ##
#########################
db:
image: postgres:14-alpine
environment:
- POSTGRES_DB=express
- POSTGRES_PASSWORD=masterkey
- POSTGRES_USER=admin
ports:
- 5432:5432
networks:
- development
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./scripts/db:/docker-entrypoint-initdb.d
container_name: express-db