-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (54 loc) · 1.04 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
version: '3.8'
services:
post-db:
image: postgres
restart: always
ports:
#- 5432:5432
- "127.0.0.1:5432:5432"
environment:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pw
POSTGRES_DB: postgres
volumes:
- postgres-db:/var/lib/postgresql/data
networks:
- application
server:
image: sctrack-img
container_name: sctrack
build:
context: .
dockerfile: server/Dockerfile
#target: prod
ports:
- 3030:3030
env_file:
- server/.env
volumes:
- .:/usr/src/app
networks:
- application
depends_on:
- post-db
# command: air cmd/main.go -b 0.0.0.0
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- 3000:3000
environment:
REACT_APP_API_HOST: localhost
REACT_APP_API_SERVER_PORT: 3030
volumes:
- ./client:/usr/src/app
networks:
- application
depends_on:
- server
volumes:
postgres-db:
networks:
application: