-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
139 lines (125 loc) · 4.05 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Copyright(c) 2022 aasaam software development group
version: "3"
services:
analytic-api:
container_name: analytic-api
depends_on:
- analytic-redis
- analytic-postgres
image: node:18-alpine
working_dir: /app/api
extra_hosts:
- "click-house-analytics.aasaam.tld:192.168.1.218"
ports:
- ${ASM_APP_PORT:-3001}:${ASM_APP_PORT:-3001}
volumes:
# development
- ./app/api:/app/api
- ./tmp/.npm:/.npm
- ./tmp/.yarn:/.yarn
- ./tmp/logs:/logs
env_file:
- ./.env.dev
command: tail -f /dev/null
analytic-front-cp:
container_name: analytic-front-cp
depends_on:
- analytic-api
environment:
ASM_FRONT_CP_PORT: ${ASM_FRONT_CP_PORT:-3000}
ASM_FRONT_CP_PATH: ${ASM_FRONT_CP_PATH:-_cp}
image: node:16-bullseye-slim
working_dir: /app/front-cp
volumes:
# development
- ./app/front-cp:/app/front-cp
# cache
- ./tmp/.npm:/root/.npm
command: tail -f /dev/null
analytic-nginx:
container_name: analytic-nginx
image: nginx:1
depends_on:
- analytic-api
ports:
- 80:80
- 443:443
environment:
ASM_NGINX_WORKER_PROCESSES: ${ASM_NGINX_WORKER_PROCESSES:-2}
ASM_NGINX_WORKER_RLIMIT_NOFILE: ${ASM_NGINX_WORKER_RLIMIT_NOFILE:-1024}
ASM_NGINX_WORKER_CONNECTIONS: ${ASM_NGINX_WORKER_CONNECTIONS:-512}
ASM_NGINX_ERROR_LOG_LEVEL: ${ASM_NGINX_ERROR_LOG_LEVEL:-debug}
ASM_NGINX_TMPFS_CACHE_SIZE_MB: ${ASM_NGINX_TMPFS_CACHE_SIZE_MB:-128}
ASM_NGINX_LARGE_CACHE_SIZE_MB: ${ASM_NGINX_LARGE_CACHE_SIZE_MB:-2048}
ASM_NGINX_LIMIT_CONNECTION: ${ASM_NGINX_LIMIT_CONNECTION:-16}
ASM_NGINX_LIMIT_RPS: ${ASM_NGINX_LIMIT_RPS:-4}
ASM_NGINX_LIMIT_RATE_KBS: ${ASM_NGINX_LIMIT_RATE_KBS:-32}
ASM_NGINX_LIMIT_BURST: ${ASM_NGINX_LIMIT_BURST:-64}
ASM_NGINX_LIMIT_RATE_AFTER_MB: ${ASM_NGINX_LIMIT_RATE_AFTER_MB:-1}
ASM_APP_PORT: ${ASM_APP_PORT:-3001}
ASM_FRONT_CP_PORT: ${ASM_FRONT_CP_PORT:-3000}
ASM_FRONT_CP_PATH: ${ASM_FRONT_CP_PATH:-_cp}
# public
ASM_PUBLIC_APP_NS: ${ASM_PUBLIC_APP_NS:-test}
ASM_PUBLIC_BASE_URL: ${ASM_PUBLIC_BASE_URL:-/}
ASM_PUBLIC_POST_UPLOADED_SIZE_BYTES: ${ASM_PUBLIC_POST_UPLOADED_SIZE_BYTES:-4194304}
tmpfs:
- /nginx-tmpfs:rw,nodev,nosuid,noexec,noatime,size=${ASM_NGINX_TMPFS_CACHE_SIZE_MB:-192}m
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/mime.types:/etc/nginx/mime.types:ro
- ./nginx/common-server.conf:/etc/nginx/common-server.conf:ro
- ./nginx/common-proxy.conf:/etc/nginx/common-proxy.conf:ro
- ./nginx/common-http.conf:/etc/nginx/common-http.conf:ro
- ./nginx/common-protected.conf:/etc/nginx/common-protected.conf:ro
- ./nginx/templates/default.dev.conf.template:/etc/nginx/templates/default.conf.template:ro
- ./nginx/cert-local:/cert:ro
###############
# Dependencies #
###############
analytic-redis:
container_name: analytic-redis
image: redis:6
analytic-rest-captcha:
container_name: analytic-captcha
image: aasaam/rest-captcha
command: run -return-value
ports:
- 4000:4000
analytic-postgres:
container_name: analytic-postgres
environment:
POSTGRES_DB: ${ASM_POSTGRES_DB:-pg-db}
POSTGRES_USER: ${ASM_POSTGRES_USER:-pg-user}
POSTGRES_PASSWORD: ${ASM_POSTGRES_PASSWORD:-pg-password}
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
image: postgres:13
##########
# Web UI #
##########
analytic-adminer:
container_name: analytic-adminer
depends_on:
- analytic-postgres
image: adminer
environment:
ADMINER_DEFAULT_SERVER: analytic-postgres
ports:
- 8080:8080
analytic-redis-commander:
container_name: analytic-redis-commander
depends_on:
- analytic-redis
image: rediscommander/redis-commander
restart: always
environment:
REDIS_HOSTS: analytic-redis
ports:
- 8082:8081
analytic-mail:
container_name: analytic-mail
image: mailhog/mailhog
ports:
- 8083:8025