-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 913 Bytes
/
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
version: '3.8'
services:
my-app-frontend:
build: ./frontend
volumes:
- my-app:/home/app
container_name: my-app-frontend
networks:
- my-app-network
ports:
- 3000:3000
# Needed to keep the container from exiting
stdin_open: true
my-app-backend:
depends_on:
- my-app-db
build: ./backend
volumes:
- my-app:/home/app
container_name: my-app-backend
networks:
- my-app-network
ports:
- 8080:8080
my-app-db:
image: postgres:13-alpine
restart: always
environment:
POSTGRES_USER: example
POSTGRES_PASSWORD: example
POSTGRES_DB: mydb
volumes:
- postgresdata:/var/lib/postgresql/data
container_name: my-app-db
networks:
- my-app-network
ports:
- 5432:5432
volumes:
my-app:
external: true
postgresdata:
networks:
my-app-network:
external: true