-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (36 loc) · 850 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (36 loc) · 850 Bytes
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
version: '3.7'
# This is the default network driver
# From https://docs.docker.com/network/
# Bridge networks are usually used when your applications run
# in standalone containers that need to communicate
networks:
app-tier:
driver: bridge
# services dependencies must be above the dependent
services:
postgresql-database:
image: bitnami/postgresql
networks:
- app-tier
ports:
- 5432:5432
volumes:
- postgresql_data:/bitnami/postgresql
environment:
- POSTGRESQL_USERNAME=myusername
- POSTGRESQL_PASSWORD=mypassword
- POSTGRESQL_DATABASE=rentx
app:
build: .
networks:
- app-tier
container_name: nodejs-rest-api
ports:
- 3333:3333
depends_on:
- postgresql-database
volumes:
- .:/usr/app
volumes:
postgresql_data:
driver: local