mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-21 23:17:10 +00:00
scripts: deploy the badges and names sites
This commit is contained in:
1 parent
5dc61cbde0
commit
61589a2fe6
4 files changed
+22
-14
No files matched your search
@@ -1,4 +1,5 @@
|
||||
.env
|
||||
config/
|
||||
data/
|
||||
web/
|
||||
badges/
|
||||
names/
|
||||
@@ -9,9 +9,9 @@ ARG CABAL=3.10.2.0
|
||||
ARG NODE=24
|
||||
|
||||
# The checkout page's dist/ is gitignored, so this stage builds it.
|
||||
FROM node:${NODE}-bookworm-slim AS web
|
||||
FROM node:${NODE}-bookworm-slim AS badges
|
||||
|
||||
WORKDIR /web
|
||||
WORKDIR /badges
|
||||
COPY apps/simplex-store-service/web/package.json apps/simplex-store-service/web/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY apps/simplex-store-service/web ./
|
||||
@@ -81,12 +81,12 @@ RUN if existing_user=$(getent passwd ${USER_UID} | cut -d: -f1) && [ -n "${exist
|
||||
useradd -u ${USER_UID} -g ${USER_GID} -m -d /home/badge badge
|
||||
|
||||
COPY --from=build /out/simplex-store-service /usr/local/bin/simplex-store-service
|
||||
COPY --from=web /web/dist /srv/web
|
||||
COPY --from=badges /badges/dist /srv/badges
|
||||
|
||||
USER badge
|
||||
WORKDIR /home/badge
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 8080 8081
|
||||
|
||||
# There is no HEALTHCHECK because the listener answers before the chat side has an address, so it
|
||||
# would report healthy too early.
|
||||
|
||||
@@ -25,5 +25,6 @@ services:
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
- ./web:/srv/webapp
|
||||
- ./badges:/srv/badges-export
|
||||
- ./names:/srv/names-export
|
||||
stop_grace_period: 10s
|
||||
@@ -1,14 +1,20 @@
|
||||
[listener]
|
||||
host = 0.0.0.0
|
||||
port = 8080
|
||||
; the built webapp in the image, read as the export source
|
||||
static_dir = /srv/web
|
||||
; split deployment: Caddy serves the exported folder; this service is the API and webhooks only.
|
||||
; Set to on for an all-in-one deployment where this service serves the webapp itself.
|
||||
; the API and the webhooks, and the badges site when serve_webapp = on
|
||||
badges_port = 8080
|
||||
; the badges build is read from the image's /srv/badges, the default of badges_static_dir; the
|
||||
; image does not build the names site yet, so mount a names build at /srv/names, the default of
|
||||
; names_static_dir
|
||||
; split deployment: Caddy serves the exported folders; this service is the API and webhooks only.
|
||||
; Set to on for an all-in-one deployment where this service serves the sites itself, the names
|
||||
; site on names_port (default 8081), which also answers the API and the webhooks.
|
||||
serve_webapp = off
|
||||
; the webapp is written here at boot with the publishable key injected; compose bind-mounts it to a
|
||||
; host path Caddy serves. Unset it when serve_webapp = on.
|
||||
webapp_export_dir = /srv/webapp
|
||||
; the badges site is written here at boot with the publishable key injected; compose bind-mounts it
|
||||
; to a host path Caddy serves. Unset it when serve_webapp = on.
|
||||
badges_export_dir = /srv/badges-export
|
||||
; the names site (simplex.domains), with [names] only: the folder it is exported to, which compose
|
||||
; bind-mounts to ./names for Caddy
|
||||
;names_export_dir = /srv/names-export
|
||||
; on because Caddy proxies /api and /webhooks to this service; without it the rate limiter keys on
|
||||
; Caddy's address and shares one bucket across all callers
|
||||
trust_forwarded_for = on
|
||||
|
||||
Reference in new issue
Block a user