generated from eXodes/nx-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
85 lines (79 loc) · 1.57 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
75
76
77
78
79
80
81
82
83
84
85
version: "3.7"
services:
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "passwd"
POSTGRES_DB: "database"
restart: unless-stopped
volumes:
- nx-postgres:/var/lib/postgresql/data/
networks:
- nx-network
redis:
image: redis:latest
container_name: redis
environment:
REDIS_PASSWORD: "passwd"
restart: unless-stopped
volumes:
- nx-redis:/data
networks:
- nx-network
backend:
image: backend:dev
container_name: backend
build:
dockerfile: apps/backend/Dockerfile
context: .
target: dev
ports:
- "3333:3333"
environment:
APP_NAME: NX-powered Applications
restart: unless-stopped
volumes:
- ./:/home
- nx-node:/home/node_modules
networks:
- nx-network
depends_on:
- postgres
- redis
frontend:
image: frontend:dev
container_name: frontend
build:
dockerfile: apps/frontend/Dockerfile
context: .
target: dev
ports:
- "3000:3000"
environment:
ORIGIN: localhost:3000
API_URL: http://backend:3333/api
restart: unless-stopped
volumes:
- ./:/home
- nx-node:/home/node_modules
networks:
- nx-network
depends_on:
- postgres
- redis
- backend
networks:
nx-network:
name: nx-network
driver: bridge
volumes:
nx-node:
name: nx-node
nx-postgres:
name: nx-postgres
nx-redis:
name: nx-redis