-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
73 lines (73 loc) · 1.51 KB
/
docker-compose-dev.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
version: "3.9"
services:
client-react-ngnix:
image: client-react-nginx-dev
build:
context: ./React-Client
dockerfile: ./Dockerfile
init: true
ports:
- 80:8080
networks:
- frontend
restart: unless-stopped
api-golang:
image: api-golang-dev
build:
context: ./Go-Application
dockerfile: ./Dockerfile
target: dev
init: true
volumes:
- type: bind
source: ./Go-Application
target: /app/
depends_on:
- db
environment:
- DATABASE_URL=postgres://postgres:adityaspostgres@db:5432/dockerPractice
ports:
- 8080:8080
networks:
- backend
- frontend
restart: unless-stopped
api-node:
image: api-node-dev
build:
context: ./Node-Application
dockerfile: ./Dockerfile
target: dev
init: true
volumes:
- type: bind
source: ./Node-Application
target: /usr/src/app
- type: volume
target: /usr/src/app/node_modules
environment:
- DATABASE_URL=postgres://postgres:adityaspostgres@db:5432/dockerPractice
depends_on:
- db
restart: unless-stopped
ports:
- 3000:3000
networks:
- frontend
- backend
db:
image: postgres:15.4-alpine3.18
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=adityaspostgres
- POSTGRES_DB=dockerPractice
networks:
- backend
ports:
- 5432:5432
volumes:
pgdata:
networks:
frontend:
backend: