create-nexgen 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +26 -0
- package/src/index.js +108 -0
- package/template/.dockerignore +14 -0
- package/template/.env +58 -0
- package/template/.env.example +59 -0
- package/template/.prettierignore +5 -0
- package/template/.prettierrc +8 -0
- package/template/README.md +447 -0
- package/template/drizzle.config.ts +29 -0
- package/template/eslint.config.js +52 -0
- package/template/gitignore-stub +24 -0
- package/template/package.json +96 -0
- package/template/public/assets/AuthLayout-CbswhpjJ.js +1 -0
- package/template/public/assets/Button-_7aQ7gHL.js +1 -0
- package/template/public/assets/Input-CLNJXmKc.css +1 -0
- package/template/public/assets/Input-z8GI8Aqo.js +1 -0
- package/template/public/assets/InputPasswordToggle-BxlzVGp3.js +1 -0
- package/template/public/assets/InputPasswordToggle-C77FI9Eg.css +1 -0
- package/template/public/assets/Layout-DotR1sQC.js +1 -0
- package/template/public/assets/Refresh-BdqsPPBC.js +1 -0
- package/template/public/assets/admin-ui-CU34rLdN.js +1 -0
- package/template/public/assets/bootstrap-icons-BeopsB42.woff +0 -0
- package/template/public/assets/bootstrap-icons-mSm7cUeB.woff2 +0 -0
- package/template/public/assets/dashboard-CwybEyLc.js +1 -0
- package/template/public/assets/dashboard-Dc4d-Pi7.css +1 -0
- package/template/public/assets/forgetPassword-CKEJaXsq.js +1 -0
- package/template/public/assets/index-Bleyx5dm.js +64 -0
- package/template/public/assets/index-DUw8E6Yg.css +1 -0
- package/template/public/assets/login-DC7PTlQF.js +1 -0
- package/template/public/assets/realtime-test-BPQdrFym.css +1 -0
- package/template/public/assets/realtime-test-tQZ0rBEJ.js +1 -0
- package/template/public/assets/register-3O7Qs28C.js +1 -0
- package/template/public/assets/resetPassword-A5AzMWKs.js +1 -0
- package/template/public/assets/verifyEmail-DDBEQHOv.js +1 -0
- package/template/public/index.html +17 -0
- package/template/src/database/migrations/mysql/0000_init.sql +73 -0
- package/template/src/database/migrations/mysql/meta/0000_snapshot.json +484 -0
- package/template/src/database/migrations/mysql/meta/_journal.json +13 -0
- package/template/src/database/schema.ts +4 -0
- package/template/src/env.ts +107 -0
- package/template/src/framework/cache/cache.ts +81 -0
- package/template/src/framework/database/connection.ts +168 -0
- package/template/src/framework/database/optional-db-drivers.d.ts +9 -0
- package/template/src/framework/database/paginate.ts +200 -0
- package/template/src/framework/database/schema.ts +26 -0
- package/template/src/framework/database/seed.ts +33 -0
- package/template/src/framework/events/dispatcher.ts +57 -0
- package/template/src/framework/facade.ts +27 -0
- package/template/src/framework/http/app.ts +61 -0
- package/template/src/framework/http/cors.ts +19 -0
- package/template/src/framework/http/logger.ts +85 -0
- package/template/src/framework/http/openapi.ts +34 -0
- package/template/src/framework/http/ratelimiter.ts +13 -0
- package/template/src/framework/http/router.ts +76 -0
- package/template/src/framework/http/static.ts +33 -0
- package/template/src/framework/http/validation.ts +24 -0
- package/template/src/framework/kernel.ts +40 -0
- package/template/src/framework/maker-cli/src/index.mjs +51 -0
- package/template/src/framework/maker-cli/src/levels/level-1/env-db.mjs +57 -0
- package/template/src/framework/maker-cli/src/levels/level-1/file-ops.mjs +30 -0
- package/template/src/framework/maker-cli/src/levels/level-1/flags.mjs +16 -0
- package/template/src/framework/maker-cli/src/levels/level-1/help.mjs +24 -0
- package/template/src/framework/maker-cli/src/levels/level-1/naming.mjs +13 -0
- package/template/src/framework/maker-cli/src/levels/level-1/process.mjs +47 -0
- package/template/src/framework/maker-cli/src/levels/level-2/db/core.mjs +299 -0
- package/template/src/framework/maker-cli/src/levels/level-2/db/index.mjs +177 -0
- package/template/src/framework/maker-cli/src/levels/level-2/deploy/core.mjs +635 -0
- package/template/src/framework/maker-cli/src/levels/level-2/deploy/index.mjs +145 -0
- package/template/src/framework/maker-cli/src/levels/level-2/module/core.mjs +707 -0
- package/template/src/framework/maker-cli/src/levels/level-2/module/index.mjs +116 -0
- package/template/src/framework/maker-cli/src/levels/level-2/runtime/build-frontend.mjs +16 -0
- package/template/src/framework/maker-cli/src/levels/level-2/runtime/core.mjs +311 -0
- package/template/src/framework/maker-cli/src/levels/level-2/runtime/index.mjs +71 -0
- package/template/src/framework/maker-cli/stubs/controller/openapi.ts.stub +55 -0
- package/template/src/framework/maker-cli/stubs/controller/openapi.with-model.ts.stub +56 -0
- package/template/src/framework/maker-cli/stubs/controller/plain.ts.stub +57 -0
- package/template/src/framework/maker-cli/stubs/controller/schema.plain.ts.stub +13 -0
- package/template/src/framework/maker-cli/stubs/controller/schema.ts.stub +32 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.bun.stub +49 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.pnpm.stub +53 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.stub +49 -0
- package/template/src/framework/maker-cli/stubs/deploy/Dockerfile.yarn.stub +53 -0
- package/template/src/framework/maker-cli/stubs/deploy/README.stub +55 -0
- package/template/src/framework/maker-cli/stubs/deploy/compose/mysql.server.stub +29 -0
- package/template/src/framework/maker-cli/stubs/deploy/compose/postgres.server.stub +29 -0
- package/template/src/framework/maker-cli/stubs/deploy/compose/sqlite.stub +29 -0
- package/template/src/framework/maker-cli/stubs/deploy/env/mysql.server.stub +73 -0
- package/template/src/framework/maker-cli/stubs/deploy/env/postgres.server.stub +73 -0
- package/template/src/framework/maker-cli/stubs/deploy/env/sqlite.stub +72 -0
- package/template/src/framework/maker-cli/stubs/deploy/scripts/auto-migrate.sh.stub +15 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/README.stub +77 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/compose/noredis.stub +118 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/compose/redis.dev.stub +131 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/compose/redis.stub +129 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/env/local.example.stub +10 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/env/noredis.stub +24 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/env/redis.stub +24 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/nginx-vhost/README.stub +15 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/nginx-vhost/app.example.com.stub +12 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/pgadmin/servers.stub +13 -0
- package/template/src/framework/maker-cli/stubs/deploy/server/redis/redis.conf.stub +6 -0
- package/template/src/framework/maker-cli/stubs/deploy/supervisor/noredis.stub +53 -0
- package/template/src/framework/maker-cli/stubs/deploy/supervisor/redis.stub +69 -0
- package/template/src/framework/maker-cli/stubs/deploy/workflow/local.json.stub +24 -0
- package/template/src/framework/maker-cli/stubs/deploy/workflow/remote.json.stub +20 -0
- package/template/src/framework/maker-cli/stubs/example/console.ts.stub +33 -0
- package/template/src/framework/maker-cli/stubs/example/controller.ts.stub +503 -0
- package/template/src/framework/maker-cli/stubs/example/job.ts.stub +74 -0
- package/template/src/framework/maker-cli/stubs/example/route.api.ts.stub +206 -0
- package/template/src/framework/maker-cli/stubs/example/schema.ts.stub +41 -0
- package/template/src/framework/maker-cli/stubs/job/name.ts.stub +24 -0
- package/template/src/framework/maker-cli/stubs/model/name.mysql.ts.stub +8 -0
- package/template/src/framework/maker-cli/stubs/model/name.postgresql.ts.stub +8 -0
- package/template/src/framework/maker-cli/stubs/model/name.sqlite.ts.stub +8 -0
- package/template/src/framework/maker-cli/stubs/notification/NotificationBell.vue.stub +218 -0
- package/template/src/framework/maker-cli/stubs/notification/controller.ts.stub +85 -0
- package/template/src/framework/maker-cli/stubs/notification/index.vue.stub +211 -0
- package/template/src/framework/maker-cli/stubs/notification/job.ts.stub +12 -0
- package/template/src/framework/maker-cli/stubs/notification/route.api.ts.stub +49 -0
- package/template/src/framework/maker-cli/stubs/notification/schema.ts.stub +25 -0
- package/template/src/framework/maker-cli/stubs/route/api.ts.stub +79 -0
- package/template/src/framework/maker-cli/stubs/route/plain.ts.stub +10 -0
- package/template/src/framework/maker-cli/stubs/schedule/name.ts.stub +35 -0
- package/template/src/framework/maker-cli/stubs/seeder/name.ts.stub +17 -0
- package/template/src/framework/modules/discover.ts +54 -0
- package/template/src/framework/modules/routes.ts +26 -0
- package/template/src/framework/notification/index.ts +109 -0
- package/template/src/framework/queue/clear.ts +20 -0
- package/template/src/framework/queue/queue.ts +213 -0
- package/template/src/framework/queue/ui.ts +104 -0
- package/template/src/framework/queue/worker.ts +33 -0
- package/template/src/framework/realtime/broadcast.ts +27 -0
- package/template/src/framework/realtime/index.ts +1 -0
- package/template/src/framework/realtime/socket-cookie.ts +65 -0
- package/template/src/framework/realtime/socket.ts +132 -0
- package/template/src/framework/realtime/types.ts +6 -0
- package/template/src/framework/realtime/ui.ts +16 -0
- package/template/src/framework/redis/client.ts +126 -0
- package/template/src/framework/scheduler/lock.ts +124 -0
- package/template/src/framework/scheduler/run.ts +26 -0
- package/template/src/framework/scheduler/scheduler.ts +82 -0
- package/template/src/framework/server.ts +147 -0
- package/template/src/framework/session/session.ts +116 -0
- package/template/src/framework/storage/storage.ts +743 -0
- package/template/src/framework/support/cookie.ts +78 -0
- package/template/src/framework/support/jwt.ts +45 -0
- package/template/src/framework/support/lifecycle.ts +35 -0
- package/template/src/framework/support/logger.ts +102 -0
- package/template/src/framework/support/mail.ts +43 -0
- package/template/src/framework/support/password.ts +23 -0
- package/template/src/framework/support/url.ts +25 -0
- package/template/src/middlewares/auth-middleware.ts +98 -0
- package/template/src/middlewares/role-middleware.ts +24 -0
- package/template/src/modules/auth/controllers/auth.controller.ts +445 -0
- package/template/src/modules/auth/controllers/auth.helpers.ts +110 -0
- package/template/src/modules/auth/controllers/auth.schema.ts +102 -0
- package/template/src/modules/auth/controllers/role.controller.ts +25 -0
- package/template/src/modules/auth/database/models/notifications.ts +22 -0
- package/template/src/modules/auth/database/models/role.ts +14 -0
- package/template/src/modules/auth/database/models/user.ts +46 -0
- package/template/src/modules/auth/database/seeders/role.ts +19 -0
- package/template/src/modules/auth/database/seeders/user.ts +33 -0
- package/template/src/modules/auth/jobs/forgetpass.ts +18 -0
- package/template/src/modules/auth/jobs/registeruser.ts +31 -0
- package/template/src/modules/auth/jobs/verifyemail.ts +18 -0
- package/template/src/modules/auth/routes/api.ts +151 -0
- package/template/src/modules/auth/routes/role.ts +39 -0
- package/template/src/modules/welcome/controllers/welcome.controller.ts +14 -0
- package/template/src/modules/welcome/controllers/welcome.schema.ts +6 -0
- package/template/src/modules/welcome/database/models/welcome.ts +6 -0
- package/template/src/modules/welcome/routes/api.ts +20 -0
- package/template/src/resources/index.html +16 -0
- package/template/src/resources/src/App.vue +5 -0
- package/template/src/resources/src/assets/css/styles.css +14934 -0
- package/template/src/resources/src/assets/css/styles.css.map +1 -0
- package/template/src/resources/src/assets/images/favicon/favicon.ico +0 -0
- package/template/src/resources/src/assets/images/favicon/favicon1.ico +0 -0
- package/template/src/resources/src/assets/images/logo-1.png +0 -0
- package/template/src/resources/src/assets/images/logo-dark-sm.png +0 -0
- package/template/src/resources/src/assets/images/logo-dark.png +0 -0
- package/template/src/resources/src/assets/images/logo-dark1.png +0 -0
- package/template/src/resources/src/assets/images/logo-sm.png +0 -0
- package/template/src/resources/src/assets/images/logo1.png +0 -0
- package/template/src/resources/src/assets/images/logo2.png +0 -0
- package/template/src/resources/src/assets/scss/custom.css +217 -0
- package/template/src/resources/src/assets/scss/custom.css.map +1 -0
- package/template/src/resources/src/assets/scss/custom.scss +1100 -0
- package/template/src/resources/src/components/Button.vue +35 -0
- package/template/src/resources/src/components/Checkbox.vue +29 -0
- package/template/src/resources/src/components/FloatButton.vue +36 -0
- package/template/src/resources/src/components/Href.vue +32 -0
- package/template/src/resources/src/components/Input.vue +227 -0
- package/template/src/resources/src/components/InputGroup.vue +153 -0
- package/template/src/resources/src/components/InputPasswordToggle.vue +226 -0
- package/template/src/resources/src/components/Modal.vue +102 -0
- package/template/src/resources/src/components/Pagebar.vue +28 -0
- package/template/src/resources/src/components/Refresh.vue +26 -0
- package/template/src/resources/src/components/Select.vue +390 -0
- package/template/src/resources/src/components/Spinner.vue +42 -0
- package/template/src/resources/src/components/Switch.vue +65 -0
- package/template/src/resources/src/components/TextArea.vue +121 -0
- package/template/src/resources/src/components/Toast.vue +56 -0
- package/template/src/resources/src/components/datatable/DataTableSkeleton.vue +99 -0
- package/template/src/resources/src/components/datatable/Pagination.vue +161 -0
- package/template/src/resources/src/components/datatable/SelectOpption.vue +54 -0
- package/template/src/resources/src/components/datatable/index.vue +237 -0
- package/template/src/resources/src/composables/useAuth.ts +52 -0
- package/template/src/resources/src/composables/useBrowserDetect.ts +5 -0
- package/template/src/resources/src/composables/useDialog.ts +5 -0
- package/template/src/resources/src/composables/useGum.ts +3 -0
- package/template/src/resources/src/composables/usePulse.ts +5 -0
- package/template/src/resources/src/env.d.ts +20 -0
- package/template/src/resources/src/helpers/nformatter.ts +10 -0
- package/template/src/resources/src/helpers/utils.ts +68 -0
- package/template/src/resources/src/layouts/AuthLayout.vue +20 -0
- package/template/src/resources/src/layouts/Layout/Footer.vue +23 -0
- package/template/src/resources/src/layouts/Layout/Header.vue +90 -0
- package/template/src/resources/src/layouts/Layout/Sidebar.vue +137 -0
- package/template/src/resources/src/layouts/Layout/index.vue +76 -0
- package/template/src/resources/src/main.ts +27 -0
- package/template/src/resources/src/pages/auth/forgetPassword.vue +76 -0
- package/template/src/resources/src/pages/auth/login.vue +93 -0
- package/template/src/resources/src/pages/auth/register.vue +130 -0
- package/template/src/resources/src/pages/auth/resetPassword.vue +119 -0
- package/template/src/resources/src/pages/auth/verifyEmail.vue +60 -0
- package/template/src/resources/src/pages/dashboard/index.vue +76 -0
- package/template/src/resources/src/plugins/axios.ts +33 -0
- package/template/src/resources/src/plugins/browserDetect.ts +55 -0
- package/template/src/resources/src/plugins/dialog.ts +167 -0
- package/template/src/resources/src/plugins/gum.ts +343 -0
- package/template/src/resources/src/plugins/pulse.ts +141 -0
- package/template/src/resources/src/plugins/routeProgress.ts +87 -0
- package/template/src/resources/src/router/index.ts +85 -0
- package/template/src/resources/src/stores/admin-ui.ts +148 -0
- package/template/src/resources/src/stores/auth.ts +151 -0
- package/template/src/resources/tsconfig.json +19 -0
- package/template/src/resources/vite.config.ts +43 -0
- package/template/src/storage/logs/app.log +20179 -0
- package/template/src/storage/logs/fatal.log +727 -0
- package/template/tsconfig.json +20 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Server Deploy (Shared Infra)
|
|
2
|
+
|
|
3
|
+
This stack is shared by multiple apps on one server.
|
|
4
|
+
|
|
5
|
+
## Includes
|
|
6
|
+
|
|
7
|
+
- jwilder nginx-proxy
|
|
8
|
+
- letsencrypt companion
|
|
9
|
+
- mysql-global
|
|
10
|
+
- postgres-global
|
|
11
|
+
{{REDIS_INCLUDE_LINE}}
|
|
12
|
+
- phpmyadmin + pgadmin
|
|
13
|
+
|
|
14
|
+
{{REDIS_CONFIG_LINE}}
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cp deploy/server/.env.example deploy/server/.env
|
|
20
|
+
cp deploy/server/.env.local.example deploy/server/.env.local
|
|
21
|
+
docker network create nginx-proxy || true
|
|
22
|
+
docker network create infra || true
|
|
23
|
+
docker compose --env-file deploy/server/.env --env-file deploy/server/.env.local -f deploy/server/docker-compose.yml up -d
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Equivalent maker command:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bun maker deploy:server
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Local Docker Desktop:
|
|
33
|
+
- Proxy: `http://localhost:8081`
|
|
34
|
+
- phpMyAdmin direct: `http://localhost:8082`
|
|
35
|
+
- pgAdmin direct: `http://localhost:8083`
|
|
36
|
+
|
|
37
|
+
Remote server deploy:
|
|
38
|
+
- Keep `PROXY_HTTP_PORT=80` and `PROXY_HTTPS_PORT=443`
|
|
39
|
+
- Keep `PHPMYADMIN_LOCAL_PORT=127.0.0.1:8082` and `PGADMIN_LOCAL_PORT=127.0.0.1:8083` to avoid exposing admin UIs publicly
|
|
40
|
+
- Optionally remove `.env.local`
|
|
41
|
+
|
|
42
|
+
## Env File Precedence (Important)
|
|
43
|
+
|
|
44
|
+
This stack intentionally uses two env files together:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
--env-file deploy/server/.env --env-file deploy/server/.env.local
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Rule:
|
|
51
|
+
- Values in `deploy/server/.env.local` override same keys from `deploy/server/.env`.
|
|
52
|
+
|
|
53
|
+
Why:
|
|
54
|
+
- `deploy/server/.env` is your shared base (works for remote/server defaults).
|
|
55
|
+
- `deploy/server/.env.local` is for Docker Desktop-only overrides.
|
|
56
|
+
|
|
57
|
+
Typical split:
|
|
58
|
+
- `deploy/server/.env`
|
|
59
|
+
- `PROXY_HTTP_PORT=80`
|
|
60
|
+
- `PROXY_HTTPS_PORT=443`
|
|
61
|
+
- production domains like `PHPMYADMIN_DOMAIN=pma.example.com`
|
|
62
|
+
- `deploy/server/.env.local`
|
|
63
|
+
- `PROXY_HTTP_PORT=8081`
|
|
64
|
+
- `PROXY_HTTPS_PORT=8443`
|
|
65
|
+
- local domains like `PHPMYADMIN_DOMAIN=pma.localhost`
|
|
66
|
+
|
|
67
|
+
Result on local Docker Desktop:
|
|
68
|
+
- Effective proxy ports become `8081/8443` (from `.env.local`).
|
|
69
|
+
- Effective local domains become `pma.localhost` / `pga.localhost` (from `.env.local`).
|
|
70
|
+
|
|
71
|
+
Result on remote server:
|
|
72
|
+
- Use only `deploy/server/.env` (or keep `.env.local` empty/unused).
|
|
73
|
+
- Effective proxy ports stay `80/443`.
|
|
74
|
+
|
|
75
|
+
Then each app deploy joins external networks `nginx-proxy` and `infra`.
|
|
76
|
+
|
|
77
|
+
Custom per-domain nginx overrides are in `deploy/server/nginx-vhost/`.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
services:
|
|
2
|
+
nginx-proxy:
|
|
3
|
+
image: jwilder/nginx-proxy
|
|
4
|
+
container_name: nginx-proxy
|
|
5
|
+
restart: unless-stopped
|
|
6
|
+
ports:
|
|
7
|
+
- "${PROXY_HTTP_PORT:-80}:80"
|
|
8
|
+
- "${PROXY_HTTPS_PORT:-443}:443"
|
|
9
|
+
volumes:
|
|
10
|
+
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
11
|
+
- ./certs:/etc/nginx/certs
|
|
12
|
+
- ./nginx-vhost:/etc/nginx/vhost.d
|
|
13
|
+
- ./html:/usr/share/nginx/html
|
|
14
|
+
labels:
|
|
15
|
+
com.github.nginx-proxy.nginx: "true"
|
|
16
|
+
networks:
|
|
17
|
+
- nginx-proxy
|
|
18
|
+
|
|
19
|
+
letsencrypt:
|
|
20
|
+
image: jrcs/letsencrypt-nginx-proxy-companion
|
|
21
|
+
container_name: nginx-letsencrypt
|
|
22
|
+
restart: unless-stopped
|
|
23
|
+
depends_on:
|
|
24
|
+
- nginx-proxy
|
|
25
|
+
environment:
|
|
26
|
+
NGINX_PROXY_CONTAINER: nginx-proxy
|
|
27
|
+
DEFAULT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
28
|
+
volumes:
|
|
29
|
+
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
30
|
+
- ./certs:/etc/nginx/certs
|
|
31
|
+
- ./nginx-vhost:/etc/nginx/vhost.d
|
|
32
|
+
- ./html:/usr/share/nginx/html
|
|
33
|
+
- ./acme:/etc/acme.sh
|
|
34
|
+
networks:
|
|
35
|
+
- nginx-proxy
|
|
36
|
+
|
|
37
|
+
mysql:
|
|
38
|
+
image: mysql:8.4
|
|
39
|
+
container_name: mysql-global
|
|
40
|
+
restart: unless-stopped
|
|
41
|
+
environment:
|
|
42
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
43
|
+
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
44
|
+
volumes:
|
|
45
|
+
- mysql_global_data:/var/lib/mysql
|
|
46
|
+
ports:
|
|
47
|
+
- "${MYSQL_PORT:-4000}:3306"
|
|
48
|
+
networks:
|
|
49
|
+
- infra
|
|
50
|
+
|
|
51
|
+
postgres:
|
|
52
|
+
image: postgres:16-alpine
|
|
53
|
+
container_name: postgres-global
|
|
54
|
+
restart: unless-stopped
|
|
55
|
+
environment:
|
|
56
|
+
POSTGRES_USER: ${POSTGRES_USER}
|
|
57
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
58
|
+
POSTGRES_DB: ${POSTGRES_DB}
|
|
59
|
+
volumes:
|
|
60
|
+
- postgres_global_data:/var/lib/postgresql/data
|
|
61
|
+
ports:
|
|
62
|
+
- "${POSTGRES_PORT:-4001}:5432"
|
|
63
|
+
networks:
|
|
64
|
+
- infra
|
|
65
|
+
|
|
66
|
+
phpmyadmin:
|
|
67
|
+
image: phpmyadmin:5-apache
|
|
68
|
+
container_name: phpmyadmin
|
|
69
|
+
restart: unless-stopped
|
|
70
|
+
environment:
|
|
71
|
+
PMA_HOST: mysql-global
|
|
72
|
+
PMA_PORT: 3306
|
|
73
|
+
PMA_ARBITRARY: 1
|
|
74
|
+
VIRTUAL_HOST: ${PHPMYADMIN_DOMAIN}
|
|
75
|
+
VIRTUAL_PORT: 80
|
|
76
|
+
LETSENCRYPT_HOST: ${PHPMYADMIN_DOMAIN}
|
|
77
|
+
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
78
|
+
ports:
|
|
79
|
+
- "${PHPMYADMIN_LOCAL_PORT:-127.0.0.1:8082}:80"
|
|
80
|
+
networks:
|
|
81
|
+
- infra
|
|
82
|
+
- nginx-proxy
|
|
83
|
+
|
|
84
|
+
pgadmin:
|
|
85
|
+
image: dpage/pgadmin4:latest
|
|
86
|
+
container_name: pgadmin
|
|
87
|
+
restart: unless-stopped
|
|
88
|
+
depends_on:
|
|
89
|
+
- postgres
|
|
90
|
+
environment:
|
|
91
|
+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
|
|
92
|
+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
|
|
93
|
+
PGADMIN_CONFIG_SERVER_MODE: "True"
|
|
94
|
+
PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json
|
|
95
|
+
VIRTUAL_HOST: ${PGADMIN_DOMAIN}
|
|
96
|
+
VIRTUAL_PORT: 80
|
|
97
|
+
LETSENCRYPT_HOST: ${PGADMIN_DOMAIN}
|
|
98
|
+
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
99
|
+
volumes:
|
|
100
|
+
- pgadmin_data:/var/lib/pgadmin
|
|
101
|
+
ports:
|
|
102
|
+
- "${PGADMIN_LOCAL_PORT:-127.0.0.1:8083}:80"
|
|
103
|
+
networks:
|
|
104
|
+
- infra
|
|
105
|
+
- nginx-proxy
|
|
106
|
+
|
|
107
|
+
volumes:
|
|
108
|
+
mysql_global_data:
|
|
109
|
+
postgres_global_data:
|
|
110
|
+
pgadmin_data:
|
|
111
|
+
|
|
112
|
+
networks:
|
|
113
|
+
nginx-proxy:
|
|
114
|
+
external: true
|
|
115
|
+
name: nginx-proxy
|
|
116
|
+
infra:
|
|
117
|
+
external: true
|
|
118
|
+
name: infra
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
services:
|
|
2
|
+
nginx-proxy:
|
|
3
|
+
image: jwilder/nginx-proxy
|
|
4
|
+
container_name: nginx-proxy
|
|
5
|
+
restart: unless-stopped
|
|
6
|
+
ports:
|
|
7
|
+
- "${PROXY_HTTP_PORT:-80}:80"
|
|
8
|
+
- "${PROXY_HTTPS_PORT:-443}:443"
|
|
9
|
+
volumes:
|
|
10
|
+
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
11
|
+
- ./certs:/etc/nginx/certs
|
|
12
|
+
- ./nginx-vhost:/etc/nginx/vhost.d
|
|
13
|
+
- ./html:/usr/share/nginx/html
|
|
14
|
+
labels:
|
|
15
|
+
com.github.nginx-proxy.nginx: "true"
|
|
16
|
+
networks:
|
|
17
|
+
- nginx-proxy
|
|
18
|
+
|
|
19
|
+
letsencrypt:
|
|
20
|
+
image: jrcs/letsencrypt-nginx-proxy-companion
|
|
21
|
+
container_name: nginx-letsencrypt
|
|
22
|
+
restart: unless-stopped
|
|
23
|
+
depends_on:
|
|
24
|
+
- nginx-proxy
|
|
25
|
+
environment:
|
|
26
|
+
NGINX_PROXY_CONTAINER: nginx-proxy
|
|
27
|
+
DEFAULT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
28
|
+
volumes:
|
|
29
|
+
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
30
|
+
- ./certs:/etc/nginx/certs
|
|
31
|
+
- ./nginx-vhost:/etc/nginx/vhost.d
|
|
32
|
+
- ./html:/usr/share/nginx/html
|
|
33
|
+
- ./acme:/etc/acme.sh
|
|
34
|
+
networks:
|
|
35
|
+
- nginx-proxy
|
|
36
|
+
|
|
37
|
+
mysql:
|
|
38
|
+
image: mysql:8.4
|
|
39
|
+
container_name: mysql-global
|
|
40
|
+
restart: unless-stopped
|
|
41
|
+
environment:
|
|
42
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
43
|
+
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
44
|
+
volumes:
|
|
45
|
+
- mysql_global_data:/var/lib/mysql
|
|
46
|
+
ports:
|
|
47
|
+
- "${MYSQL_PORT:-4000}:3306"
|
|
48
|
+
networks:
|
|
49
|
+
- infra
|
|
50
|
+
|
|
51
|
+
postgres:
|
|
52
|
+
image: postgres:16-alpine
|
|
53
|
+
container_name: postgres-global
|
|
54
|
+
restart: unless-stopped
|
|
55
|
+
environment:
|
|
56
|
+
POSTGRES_USER: ${POSTGRES_USER}
|
|
57
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
58
|
+
POSTGRES_DB: ${POSTGRES_DB}
|
|
59
|
+
volumes:
|
|
60
|
+
- postgres_global_data:/var/lib/postgresql/data
|
|
61
|
+
ports:
|
|
62
|
+
- "${POSTGRES_PORT:-4001}:5432"
|
|
63
|
+
networks:
|
|
64
|
+
- infra
|
|
65
|
+
|
|
66
|
+
redis:
|
|
67
|
+
image: redis:7-alpine
|
|
68
|
+
container_name: redis-global
|
|
69
|
+
restart: unless-stopped
|
|
70
|
+
ports:
|
|
71
|
+
- "6379:6379"
|
|
72
|
+
volumes:
|
|
73
|
+
- redis_global_data:/data
|
|
74
|
+
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "512mb", "--maxmemory-policy", "noeviction"]
|
|
75
|
+
networks:
|
|
76
|
+
- infra
|
|
77
|
+
|
|
78
|
+
phpmyadmin:
|
|
79
|
+
image: phpmyadmin:5-apache
|
|
80
|
+
container_name: phpmyadmin
|
|
81
|
+
restart: unless-stopped
|
|
82
|
+
environment:
|
|
83
|
+
PMA_HOST: mysql-global
|
|
84
|
+
PMA_PORT: 3306
|
|
85
|
+
PMA_ARBITRARY: 1
|
|
86
|
+
VIRTUAL_HOST: ${PHPMYADMIN_DOMAIN}
|
|
87
|
+
VIRTUAL_PORT: 80
|
|
88
|
+
LETSENCRYPT_HOST: ${PHPMYADMIN_DOMAIN}
|
|
89
|
+
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
90
|
+
ports:
|
|
91
|
+
- "${PHPMYADMIN_LOCAL_PORT:-127.0.0.1:8082}:80"
|
|
92
|
+
networks:
|
|
93
|
+
- infra
|
|
94
|
+
- nginx-proxy
|
|
95
|
+
|
|
96
|
+
pgadmin:
|
|
97
|
+
image: dpage/pgadmin4:latest
|
|
98
|
+
container_name: pgadmin
|
|
99
|
+
restart: unless-stopped
|
|
100
|
+
depends_on:
|
|
101
|
+
- postgres
|
|
102
|
+
environment:
|
|
103
|
+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
|
|
104
|
+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
|
|
105
|
+
PGADMIN_CONFIG_SERVER_MODE: "True"
|
|
106
|
+
PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json
|
|
107
|
+
VIRTUAL_HOST: ${PGADMIN_DOMAIN}
|
|
108
|
+
VIRTUAL_PORT: 80
|
|
109
|
+
LETSENCRYPT_HOST: ${PGADMIN_DOMAIN}
|
|
110
|
+
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
111
|
+
volumes:
|
|
112
|
+
- pgadmin_data:/var/lib/pgadmin
|
|
113
|
+
ports:
|
|
114
|
+
- "${PGADMIN_LOCAL_PORT:-127.0.0.1:8083}:80"
|
|
115
|
+
networks:
|
|
116
|
+
- infra
|
|
117
|
+
- nginx-proxy
|
|
118
|
+
|
|
119
|
+
volumes:
|
|
120
|
+
mysql_global_data:
|
|
121
|
+
postgres_global_data:
|
|
122
|
+
redis_global_data:
|
|
123
|
+
pgadmin_data:
|
|
124
|
+
|
|
125
|
+
networks:
|
|
126
|
+
nginx-proxy:
|
|
127
|
+
external: true
|
|
128
|
+
name: nginx-proxy
|
|
129
|
+
infra:
|
|
130
|
+
external: true
|
|
131
|
+
name: infra
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
services:
|
|
2
|
+
nginx-proxy:
|
|
3
|
+
image: jwilder/nginx-proxy
|
|
4
|
+
container_name: nginx-proxy
|
|
5
|
+
restart: unless-stopped
|
|
6
|
+
ports:
|
|
7
|
+
- "${PROXY_HTTP_PORT:-80}:80"
|
|
8
|
+
- "${PROXY_HTTPS_PORT:-443}:443"
|
|
9
|
+
volumes:
|
|
10
|
+
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
11
|
+
- ./certs:/etc/nginx/certs
|
|
12
|
+
- ./nginx-vhost:/etc/nginx/vhost.d
|
|
13
|
+
- ./html:/usr/share/nginx/html
|
|
14
|
+
labels:
|
|
15
|
+
com.github.nginx-proxy.nginx: "true"
|
|
16
|
+
networks:
|
|
17
|
+
- nginx-proxy
|
|
18
|
+
|
|
19
|
+
letsencrypt:
|
|
20
|
+
image: jrcs/letsencrypt-nginx-proxy-companion
|
|
21
|
+
container_name: nginx-letsencrypt
|
|
22
|
+
restart: unless-stopped
|
|
23
|
+
depends_on:
|
|
24
|
+
- nginx-proxy
|
|
25
|
+
environment:
|
|
26
|
+
NGINX_PROXY_CONTAINER: nginx-proxy
|
|
27
|
+
DEFAULT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
28
|
+
volumes:
|
|
29
|
+
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
30
|
+
- ./certs:/etc/nginx/certs
|
|
31
|
+
- ./nginx-vhost:/etc/nginx/vhost.d
|
|
32
|
+
- ./html:/usr/share/nginx/html
|
|
33
|
+
- ./acme:/etc/acme.sh
|
|
34
|
+
networks:
|
|
35
|
+
- nginx-proxy
|
|
36
|
+
|
|
37
|
+
mysql:
|
|
38
|
+
image: mysql:8.4
|
|
39
|
+
container_name: mysql-global
|
|
40
|
+
restart: unless-stopped
|
|
41
|
+
environment:
|
|
42
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
43
|
+
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
44
|
+
volumes:
|
|
45
|
+
- mysql_global_data:/var/lib/mysql
|
|
46
|
+
ports:
|
|
47
|
+
- "${MYSQL_PORT:-4000}:3306"
|
|
48
|
+
networks:
|
|
49
|
+
- infra
|
|
50
|
+
|
|
51
|
+
postgres:
|
|
52
|
+
image: postgres:16-alpine
|
|
53
|
+
container_name: postgres-global
|
|
54
|
+
restart: unless-stopped
|
|
55
|
+
environment:
|
|
56
|
+
POSTGRES_USER: ${POSTGRES_USER}
|
|
57
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
58
|
+
POSTGRES_DB: ${POSTGRES_DB}
|
|
59
|
+
volumes:
|
|
60
|
+
- postgres_global_data:/var/lib/postgresql/data
|
|
61
|
+
ports:
|
|
62
|
+
- "${POSTGRES_PORT:-4001}:5432"
|
|
63
|
+
networks:
|
|
64
|
+
- infra
|
|
65
|
+
|
|
66
|
+
redis:
|
|
67
|
+
image: redis:7-alpine
|
|
68
|
+
container_name: redis-global
|
|
69
|
+
restart: unless-stopped
|
|
70
|
+
volumes:
|
|
71
|
+
- redis_global_data:/data
|
|
72
|
+
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "512mb", "--maxmemory-policy", "noeviction"]
|
|
73
|
+
networks:
|
|
74
|
+
- infra
|
|
75
|
+
|
|
76
|
+
phpmyadmin:
|
|
77
|
+
image: phpmyadmin:5-apache
|
|
78
|
+
container_name: phpmyadmin
|
|
79
|
+
restart: unless-stopped
|
|
80
|
+
environment:
|
|
81
|
+
PMA_HOST: mysql-global
|
|
82
|
+
PMA_PORT: 3306
|
|
83
|
+
PMA_ARBITRARY: 1
|
|
84
|
+
VIRTUAL_HOST: ${PHPMYADMIN_DOMAIN}
|
|
85
|
+
VIRTUAL_PORT: 80
|
|
86
|
+
LETSENCRYPT_HOST: ${PHPMYADMIN_DOMAIN}
|
|
87
|
+
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
88
|
+
ports:
|
|
89
|
+
- "${PHPMYADMIN_LOCAL_PORT:-127.0.0.1:8082}:80"
|
|
90
|
+
networks:
|
|
91
|
+
- infra
|
|
92
|
+
- nginx-proxy
|
|
93
|
+
|
|
94
|
+
pgadmin:
|
|
95
|
+
image: dpage/pgadmin4:latest
|
|
96
|
+
container_name: pgadmin
|
|
97
|
+
restart: unless-stopped
|
|
98
|
+
depends_on:
|
|
99
|
+
- postgres
|
|
100
|
+
environment:
|
|
101
|
+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
|
|
102
|
+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
|
|
103
|
+
PGADMIN_CONFIG_SERVER_MODE: "True"
|
|
104
|
+
PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json
|
|
105
|
+
VIRTUAL_HOST: ${PGADMIN_DOMAIN}
|
|
106
|
+
VIRTUAL_PORT: 80
|
|
107
|
+
LETSENCRYPT_HOST: ${PGADMIN_DOMAIN}
|
|
108
|
+
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
109
|
+
volumes:
|
|
110
|
+
- pgadmin_data:/var/lib/pgadmin
|
|
111
|
+
ports:
|
|
112
|
+
- "${PGADMIN_LOCAL_PORT:-127.0.0.1:8083}:80"
|
|
113
|
+
networks:
|
|
114
|
+
- infra
|
|
115
|
+
- nginx-proxy
|
|
116
|
+
|
|
117
|
+
volumes:
|
|
118
|
+
mysql_global_data:
|
|
119
|
+
postgres_global_data:
|
|
120
|
+
redis_global_data:
|
|
121
|
+
pgadmin_data:
|
|
122
|
+
|
|
123
|
+
networks:
|
|
124
|
+
nginx-proxy:
|
|
125
|
+
external: true
|
|
126
|
+
name: nginx-proxy
|
|
127
|
+
infra:
|
|
128
|
+
external: true
|
|
129
|
+
name: infra
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Local-only overrides for Docker Desktop
|
|
2
|
+
# This file is applied together with deploy/server/.env and should not be used on remote.
|
|
3
|
+
PROXY_HTTP_PORT=8081
|
|
4
|
+
PROXY_HTTPS_PORT=8443
|
|
5
|
+
PHPMYADMIN_DOMAIN=pma.localhost
|
|
6
|
+
PGADMIN_DOMAIN=pga.localhost
|
|
7
|
+
|
|
8
|
+
# Optional local DB name override (takes precedence over deploy/server/.env)
|
|
9
|
+
# MYSQL_DATABASE=nexgen
|
|
10
|
+
# POSTGRES_DB=nexgen
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Server infra env template (base values)
|
|
2
|
+
# Remote: copy to deploy/server/.env and use as-is
|
|
3
|
+
# Local: copy to deploy/server/.env then override in deploy/server/.env.local
|
|
4
|
+
LETSENCRYPT_EMAIL=ops@example.com
|
|
5
|
+
PROXY_HTTP_PORT=80
|
|
6
|
+
PROXY_HTTPS_PORT=443
|
|
7
|
+
|
|
8
|
+
MYSQL_ROOT_PASSWORD=change-me-root
|
|
9
|
+
MYSQL_DATABASE=nexgen
|
|
10
|
+
MYSQL_PORT=4000
|
|
11
|
+
|
|
12
|
+
POSTGRES_USER=postgres
|
|
13
|
+
POSTGRES_PASSWORD=change-me-postgres
|
|
14
|
+
POSTGRES_DB=postgres
|
|
15
|
+
POSTGRES_PORT=4001
|
|
16
|
+
|
|
17
|
+
REDIS=false
|
|
18
|
+
|
|
19
|
+
PHPMYADMIN_DOMAIN=pma.example.com
|
|
20
|
+
PGADMIN_DOMAIN=pga.example.com
|
|
21
|
+
PGADMIN_DEFAULT_EMAIL=admin@example.com
|
|
22
|
+
PGADMIN_DEFAULT_PASSWORD=admin123
|
|
23
|
+
PHPMYADMIN_LOCAL_PORT=127.0.0.1:8082
|
|
24
|
+
PGADMIN_LOCAL_PORT=127.0.0.1:8083
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Server infra env template (base values)
|
|
2
|
+
# Remote: copy to deploy/server/.env and use as-is
|
|
3
|
+
# Local: copy to deploy/server/.env then override in deploy/server/.env.local
|
|
4
|
+
LETSENCRYPT_EMAIL=ops@example.com
|
|
5
|
+
PROXY_HTTP_PORT=80
|
|
6
|
+
PROXY_HTTPS_PORT=443
|
|
7
|
+
|
|
8
|
+
MYSQL_ROOT_PASSWORD=change-me-root
|
|
9
|
+
MYSQL_DATABASE=nexgen
|
|
10
|
+
MYSQL_PORT=4000
|
|
11
|
+
|
|
12
|
+
POSTGRES_USER=postgres
|
|
13
|
+
POSTGRES_PASSWORD=change-me-postgres
|
|
14
|
+
POSTGRES_DB=postgres
|
|
15
|
+
POSTGRES_PORT=4001
|
|
16
|
+
|
|
17
|
+
REDIS=true
|
|
18
|
+
|
|
19
|
+
PHPMYADMIN_DOMAIN=pma.example.com
|
|
20
|
+
PGADMIN_DOMAIN=pga.example.com
|
|
21
|
+
PGADMIN_DEFAULT_EMAIL=admin@example.com
|
|
22
|
+
PGADMIN_DEFAULT_PASSWORD=admin123
|
|
23
|
+
PHPMYADMIN_LOCAL_PORT=127.0.0.1:8082
|
|
24
|
+
PGADMIN_LOCAL_PORT=127.0.0.1:8083
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# nginx-vhost overrides
|
|
2
|
+
|
|
3
|
+
This folder holds per-domain nginx overrides for `jwilder/nginx-proxy`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
1. Copy `app.example.com` to your real app domain file name.
|
|
8
|
+
2. Edit rules as needed (timeouts, upload limits, auth for `/bullmq`, etc).
|
|
9
|
+
3. Recreate or reload proxy container if needed.
|
|
10
|
+
|
|
11
|
+
Example:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cp deploy/server/nginx-vhost/app.example.com deploy/server/nginx-vhost/api.yourdomain.com
|
|
15
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Custom nginx vhost overrides for app.example.com
|
|
2
|
+
# File name should match your APP_DOMAIN exactly.
|
|
3
|
+
|
|
4
|
+
client_max_body_size 50m;
|
|
5
|
+
proxy_read_timeout 300;
|
|
6
|
+
proxy_send_timeout 300;
|
|
7
|
+
|
|
8
|
+
# Protect BullMQ UI in production
|
|
9
|
+
location /bullmq {
|
|
10
|
+
auth_basic "Restricted";
|
|
11
|
+
auth_basic_user_file /etc/nginx/vhost.d/.htpasswd;
|
|
12
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[supervisord]
|
|
2
|
+
nodaemon=true
|
|
3
|
+
user=root
|
|
4
|
+
logfile=/dev/null
|
|
5
|
+
logfile_maxbytes=0
|
|
6
|
+
pidfile=/var/run/supervisord.pid
|
|
7
|
+
loglevel=info
|
|
8
|
+
|
|
9
|
+
[program:migrate]
|
|
10
|
+
command=/bin/sh -lc "/bin/sh /app/deploy/scripts/auto-migrate.sh {{RUNTIME_EXEC}}"
|
|
11
|
+
directory=/app
|
|
12
|
+
autostart=true
|
|
13
|
+
autorestart=false
|
|
14
|
+
priority=5
|
|
15
|
+
startsecs=0
|
|
16
|
+
startretries=1
|
|
17
|
+
exitcodes=0
|
|
18
|
+
stdout_logfile=/dev/stdout
|
|
19
|
+
stderr_logfile=/dev/stderr
|
|
20
|
+
stdout_logfile_maxbytes=0
|
|
21
|
+
stderr_logfile_maxbytes=0
|
|
22
|
+
|
|
23
|
+
[program:api]
|
|
24
|
+
command=/bin/sh -lc "{{RUNTIME_EXEC}} src/framework/maker-cli/src/index.mjs serve --prod --runtime={{RUNTIME_NAME}}"
|
|
25
|
+
directory=/app
|
|
26
|
+
autostart=true
|
|
27
|
+
autorestart=true
|
|
28
|
+
priority=20
|
|
29
|
+
startsecs=3
|
|
30
|
+
startretries=5
|
|
31
|
+
stopsignal=TERM
|
|
32
|
+
stopwaitsecs=20
|
|
33
|
+
redirect_stderr=true
|
|
34
|
+
stdout_logfile=/dev/stdout
|
|
35
|
+
stdout_logfile_maxbytes=0
|
|
36
|
+
stopasgroup=true
|
|
37
|
+
killasgroup=true
|
|
38
|
+
|
|
39
|
+
[program:scheduler]
|
|
40
|
+
command=/bin/sh -lc "{{RUNTIME_EXEC}} src/framework/maker-cli/src/index.mjs schedule:work --prod --runtime={{RUNTIME_NAME}}"
|
|
41
|
+
directory=/app
|
|
42
|
+
autostart=true
|
|
43
|
+
autorestart=true
|
|
44
|
+
priority=40
|
|
45
|
+
startsecs=3
|
|
46
|
+
startretries=5
|
|
47
|
+
stopsignal=TERM
|
|
48
|
+
stopwaitsecs=20
|
|
49
|
+
redirect_stderr=true
|
|
50
|
+
stdout_logfile=/dev/stdout
|
|
51
|
+
stdout_logfile_maxbytes=0
|
|
52
|
+
stopasgroup=true
|
|
53
|
+
killasgroup=true
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[supervisord]
|
|
2
|
+
nodaemon=true
|
|
3
|
+
user=root
|
|
4
|
+
logfile=/dev/null
|
|
5
|
+
logfile_maxbytes=0
|
|
6
|
+
pidfile=/var/run/supervisord.pid
|
|
7
|
+
loglevel=info
|
|
8
|
+
|
|
9
|
+
[program:migrate]
|
|
10
|
+
command=/bin/sh -lc "/bin/sh /app/deploy/scripts/auto-migrate.sh {{RUNTIME_EXEC}}"
|
|
11
|
+
directory=/app
|
|
12
|
+
autostart=true
|
|
13
|
+
autorestart=false
|
|
14
|
+
priority=5
|
|
15
|
+
startsecs=0
|
|
16
|
+
startretries=1
|
|
17
|
+
exitcodes=0
|
|
18
|
+
stdout_logfile=/dev/stdout
|
|
19
|
+
stderr_logfile=/dev/stderr
|
|
20
|
+
stdout_logfile_maxbytes=0
|
|
21
|
+
stderr_logfile_maxbytes=0
|
|
22
|
+
|
|
23
|
+
[program:api]
|
|
24
|
+
command=/bin/sh -lc "{{RUNTIME_EXEC}} src/framework/maker-cli/src/index.mjs serve --prod --runtime={{RUNTIME_NAME}}"
|
|
25
|
+
directory=/app
|
|
26
|
+
autostart=true
|
|
27
|
+
autorestart=true
|
|
28
|
+
priority=20
|
|
29
|
+
startsecs=3
|
|
30
|
+
startretries=5
|
|
31
|
+
stopsignal=TERM
|
|
32
|
+
stopwaitsecs=20
|
|
33
|
+
redirect_stderr=true
|
|
34
|
+
stdout_logfile=/dev/stdout
|
|
35
|
+
stdout_logfile_maxbytes=0
|
|
36
|
+
stopasgroup=true
|
|
37
|
+
killasgroup=true
|
|
38
|
+
|
|
39
|
+
[program:queue]
|
|
40
|
+
command=/bin/sh -lc "{{RUNTIME_EXEC}} src/framework/maker-cli/src/index.mjs queue:work --queue=default,mail --prod --runtime={{RUNTIME_NAME}}"
|
|
41
|
+
directory=/app
|
|
42
|
+
autostart=true
|
|
43
|
+
autorestart=true
|
|
44
|
+
priority=30
|
|
45
|
+
startsecs=3
|
|
46
|
+
startretries=5
|
|
47
|
+
stopsignal=TERM
|
|
48
|
+
stopwaitsecs=20
|
|
49
|
+
redirect_stderr=true
|
|
50
|
+
stdout_logfile=/dev/stdout
|
|
51
|
+
stdout_logfile_maxbytes=0
|
|
52
|
+
stopasgroup=true
|
|
53
|
+
killasgroup=true
|
|
54
|
+
|
|
55
|
+
[program:scheduler]
|
|
56
|
+
command=/bin/sh -lc "{{RUNTIME_EXEC}} src/framework/maker-cli/src/index.mjs schedule:work --prod --runtime={{RUNTIME_NAME}}"
|
|
57
|
+
directory=/app
|
|
58
|
+
autostart=true
|
|
59
|
+
autorestart=true
|
|
60
|
+
priority=40
|
|
61
|
+
startsecs=3
|
|
62
|
+
startretries=5
|
|
63
|
+
stopsignal=TERM
|
|
64
|
+
stopwaitsecs=20
|
|
65
|
+
redirect_stderr=true
|
|
66
|
+
stdout_logfile=/dev/stdout
|
|
67
|
+
stdout_logfile_maxbytes=0
|
|
68
|
+
stopasgroup=true
|
|
69
|
+
killasgroup=true
|