-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (94 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
101 lines (94 loc) · 2.46 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
services:
redis:
image: redis:alpine
container_name: redis-nativex
restart: always
command: redis-server --appendonly yes
volumes:
- redis_data:/data
networks:
- nativex-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 3
db:
image: postgres:16
container_name: db-nativex
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: securepassword
POSTGRES_DB: mydb
ports:
- "5434:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- nativex-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d mydb"]
interval: 5s
timeout: 5s
retries: 3
nativex-api:
image: ${DOCKER_USERNAME:-local}/nativex-backend:latest
build:
context: .
dockerfile: Dockerfile
command: bun run ./apps/primary-backend/index.ts
networks:
- nativex-network
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.nativex-api.rule=Host(`backend.nativex.rishik.codes`)"
- "traefik.http.routers.nativex-api.entrypoints=web"
- "traefik.http.routers.nativex-api-secure.rule=Host(`backend.nativex.rishik.codes`)"
- "traefik.http.routers.nativex-api-secure.entrypoints=websecure"
- "traefik.http.routers.nativex-api-secure.tls=true"
- "traefik.http.routers.nativex-api-secure.tls.certresolver=myresolver"
- "traefik.http.services.nativex-api.loadbalancer.server.port=3002"
ports:
- "3002:3002"
env_file:
- .env
depends_on:
- redis
- db
nativex-worker:
image: ${DOCKER_USERNAME:-local}/nativex-backend:latest
build:
context: .
dockerfile: Dockerfile
command: bun run ./apps/orchestrator/src/services/worker.ts
networks:
- nativex-network
env_file:
- .env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOST_ROOT:-/home/user/projects}:${HOST_ROOT:-/home/user/projects}
depends_on:
- redis
- db
nativex-editor:
build:
context: .
dockerfile: apps/sandbox/Dockerfile.editor
image: nativex-editor
nativex-builder:
build:
context: .
dockerfile: apps/sandbox/Dockerfile.builder
image: nativex-builder
networks:
nativex-network:
external: true
proxy:
external: true
volumes:
redis_data:
postgres_data: