-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·74 lines (69 loc) · 1.36 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
version: '3.9'
services:
go:
container_name: go-api
build:
context: .
dockerfile: docker/go/Dockerfile
tty: true
ports:
- 8080:8080
env_file:
- ./.env
depends_on:
- db
volumes:
- type: bind
source: ./backend
target: /go/app
networks:
- go_react_portfolio
react:
container_name: react-front
build:
context: .
dockerfile: docker/react/Dockerfile
volumes:
- type: bind
source: ./front
target: /react/app
command: sh -c 'yarn start'
ports:
- "3000:3000"
stdin_open: true
tty: true
networks:
- go_react_portfolio
db:
container_name: db
image: postgres:13
restart: always
tty: true
ports:
- 5432:5432
env_file:
- ./.env
volumes:
- portfolio:/var/lib/postgresql/data
networks:
- go_react_portfolio
redis:
container_name: redis
build:
context: .
dockerfile: docker/redis/Dockerfile
command: redis-server --appendonly yes
depends_on:
- db
ports:
- 16378:6379
volumes:
- ./docker/redis/data:/data
networks:
- go_react_portfolio
volumes:
portfolio:
name: portfolio
networks:
go_react_portfolio:
external: true