-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (116 loc) · 3.14 KB
/
docker-compose.yml
File metadata and controls
122 lines (116 loc) · 3.14 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '3.8'
services:
mongodb:
image: mongo:7.0
container_name: filebump-mongodb
restart: unless-stopped
environment:
MONGO_INITDB_DATABASE: filebump
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
- mongodb_logs:/data/logs
networks:
- filebump-network
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
file-api:
build:
context: .
dockerfile: Dockerfile
args:
NODE_ENV: production
image: filebump:latest
container_name: filebump-file-api
restart: unless-stopped
command: npm run start --workspace=packages/file-api
ports:
- "3007:3007"
environment:
NODE_ENV: production
PORT: 3007
FILE_API_PORT: 3007
FILE_API_URL: http://localhost:3007
FILE_STORAGE_DIR: /tmp/uploads
FILE_API_KEYS: ${FILE_API_KEYS:-testKey1,testKey2}
MONGODB_LOGS: mongodb://mongodb:27017/filebumb-logs
MONGODB_DATA: mongodb://mongodb:27017/filebump-files
volumes:
- uploads_data:/tmp/uploads
depends_on:
mongodb:
condition: service_healthy
networks:
- filebump-network
healthcheck:
test: ["CMD-SHELL", "wget --quiet --tries=1 --spider http://localhost:3007/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
admin-backend:
build:
context: .
dockerfile: Dockerfile
args:
NODE_ENV: production
image: filebump:latest
container_name: filebump-admin-backend
restart: unless-stopped
command: sh -c "npm run build --workspace=packages/admin-ui && npm run start --workspace=packages/admin-backend"
ports:
- "33033:33033"
environment:
NODE_ENV: production
PORT: 33033
ADMIN_BACKEND_PORT: 33033
SESSION_SECRET: ${SESSION_SECRET:-filebump-admin-secret}
FILE_API_URL: http://file-api:3007
MONGODB_LOGS: mongodb://mongodb:27017/filebumb-logs
MONGODB_DATA: mongodb://mongodb:27017/filebump-files
depends_on:
mongodb:
condition: service_healthy
networks:
- filebump-network
healthcheck:
test: ["CMD-SHELL", "wget --quiet --tries=1 --spider http://localhost:33033/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
cron-jobs:
build:
context: .
dockerfile: Dockerfile
args:
NODE_ENV: production
image: filebump:latest
container_name: filebump-cron-jobs
restart: unless-stopped
command: npm run start --workspace=packages/cron-jobs
environment:
NODE_ENV: production
CLEAR_FILES_TASK_SCHEDULE: ${CLEAR_FILES_TASK_SCHEDULE:-0 0 1 * * *}
MONGODB_LOGS: mongodb://mongodb:27017/filebumb-logs
MONGODB_DATA: mongodb://mongodb:27017/filebump-files
depends_on:
mongodb:
condition: service_healthy
networks:
- filebump-network
networks:
filebump-network:
driver: bridge
volumes:
mongodb_data:
driver: local
mongodb_logs:
driver: local
uploads_data:
driver: local