-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (36 loc) · 861 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (36 loc) · 861 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'
services:
app:
container_name: full_app
image: carmal891/fullstack:latest
# build: .
ports:
- 9091:9091
restart: on-failure
volumes:
- api:/usr/src/app/
depends_on:
- fullstack-postgres # This service depends on postgres. Start that first.
networks:
- fullstack
fullstack-postgres:
image: postgres:latest
container_name: full_db_postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
ports:
- '5432:5432'
volumes:
- database_postgres:/var/lib/postgresql/data
networks:
- fullstack
volumes:
api:
database_postgres:
# Networks to be created to facilitate communication between containers
networks:
fullstack:
driver: bridge