From 0036eecc6d5816d32bfd64ef55ea5ab199ddc428 Mon Sep 17 00:00:00 2001 From: afterlifepro Date: Sat, 23 Aug 2025 19:17:53 +0100 Subject: [PATCH] Add saltire the gays submodule and build into nginx --- .gitmodules | 3 +++ nginx/Dockerfile | 21 ++++++++++++++++++--- nginx/templates/default.conf.template | 13 ++++++++++++- saltire-the-gays | 1 + 4 files changed, 34 insertions(+), 4 deletions(-) create mode 160000 saltire-the-gays diff --git a/.gitmodules b/.gitmodules index 2d4e512..ab96678 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "dong-web"] path = dong-web url = https://tangled.sh/@vielle.dev/dong-web +[submodule "saltire-the-gays"] + path = saltire-the-gays + url = https://tangled.sh/@vielle.dev/saltire-the-gays diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 885f4e6..5dd14fb 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -6,13 +6,28 @@ ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable pnpm && corepack install -g pnpm@latest -# copy dong project, install packages, and build +# copy project, install packages, and build COPY ./dong-web ./ RUN pnpm install --prod RUN pnpm run build +FROM node:24-alpine AS saltire-the-gays +WORKDIR /app + +# install pnpm +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable pnpm && corepack install -g pnpm@latest + +# copy project, install packages, and build +COPY ./saltire-the-gays ./ +RUN pnpm install --prod +RUN pnpm run build + # build nginx FROM nginx:1-alpine -# copy built files from dong-web to /app -COPY --from=dong-web /app/dist /app/dong-web \ No newline at end of file + +# copy built files to /app +COPY --from=dong-web /app/dist /app/dong-web +COPY --from=saltire-the-gays /app/dist /app/saltire-the-gays \ No newline at end of file diff --git a/nginx/templates/default.conf.template b/nginx/templates/default.conf.template index 23a2b00..f0350b7 100644 --- a/nginx/templates/default.conf.template +++ b/nginx/templates/default.conf.template @@ -24,10 +24,21 @@ server { } server { - server_name dong.${NGINX_HOST}; listen 80; listen [::]:80; + server_name dong.${NGINX_HOST}; + location / { root /app/dong-web; } +} + +server { + listen 80; + listen [::]:80; + server_name saltire-the-gays.${NGINX_HOST}; + + location / { + root /app/saltire-the-gays; + } } \ No newline at end of file diff --git a/saltire-the-gays b/saltire-the-gays new file mode 160000 index 0000000..726938a --- /dev/null +++ b/saltire-the-gays @@ -0,0 +1 @@ +Subproject commit 726938a73505fa06d9448c9caee3eb555b63e208 -- 2.51.2