-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
56 lines (54 loc) · 1.67 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
version: '3.8'
services:
database:
container_name: vitnode_database
image: postgres:16.3-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE:-vitnode}
ports:
- '${DB_PORT:-5432}:${DB_PORT:-5432}'
volumes:
- ./docker/prod/database:/var/lib/postgresql/data
networks:
- vitnode
backend:
container_name: vitnode_backend
build:
context: .
dockerfile: ./apps/backend/DockerFile
restart: unless-stopped
depends_on:
- database
environment:
DB_HOST: ${DB_HOST:-database}
env_file:
- .env
command: sh -c "cd apps/backend && npm run config:init && node dist/main.js"
ports:
- '8080:8080'
volumes:
- ./apps/backend/uploads:/app/apps/backend/uploads # uploads
- ./apps/backend/src/plugins/core:/app/apps/backend/src/plugins/core # core
- ./apps/frontend/src/plugins/admin/langs:/app/apps/frontend/src/plugins/admin/langs # admin - langs
- ./apps/frontend/src/plugins/core/langs:/app/apps/frontend/src/plugins/core/langs # core - langs
networks:
- vitnode
frontend:
container_name: vitnode_frontend
build:
context: .
dockerfile: ./apps/frontend/DockerFile
args:
- NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL:-http://backend:8080}
- NEXT_PUBLIC_BACKEND_CLIENT_URL=${NEXT_PUBLIC_BACKEND_CLIENT_URL:-http://localhost:8080}
- NEXT_PUBLIC_FRONTEND_URL=${NEXT_PUBLIC_FRONTEND_URL:-http://localhost:3000}
restart: unless-stopped
ports:
- '3000:3000'
networks:
- vitnode
networks:
vitnode: