Compare commits

..

5 Commits

Author SHA1 Message Date
Jon Staab ab21008f34 Add etag for immutable assets
Docker / build-and-push-image (push) Successful in 11m19s
2026-05-12 08:46:50 -07:00
Jon Staab 0998639d59 Push to gitea package registry
Docker / build-and-push-image (push) Successful in 11m31s
2026-05-11 13:49:37 -07:00
Jon Staab eccde07d06 Fix dockerfile again
Docker / build-and-push-image (push) Successful in 12m2s
2026-05-11 13:20:47 -07:00
Jon Staab 770cdc5f13 Reduce extra space on android when keyboard is open 2026-05-11 12:44:44 -07:00
Jon Staab 6bafb62414 Fix docker build
Docker / build-and-push-image (push) Successful in 12m9s
2026-05-11 12:28:42 -07:00
6 changed files with 35 additions and 33 deletions
-1
View File
@@ -4,7 +4,6 @@ ios
build
# Git
.git
.gitignore
# Env files (keep .env for build; exclude local overrides)
+4 -4
View File
@@ -5,8 +5,8 @@ on:
branches: [master]
env:
REGISTRY: ghcr.io
IMAGE_NAME: coracle-social/flotilla
REGISTRY: gitea.coracle.social
IMAGE_NAME: coracle/flotilla
jobs:
build-and-push-image:
@@ -23,8 +23,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
username: hodlbod
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
+13 -26
View File
@@ -1,40 +1,27 @@
# Stage 1: Build
# Uses .env from build context for config (logo, branding, etc.)
# Optional: docker build --build-arg VITE_BUILD_HASH=$(git rev-parse --short HEAD) -t flotilla .
# Build and run the Flotilla web server.
#
# docker build -t flotilla .
# docker run -p 3000:3000 flotilla
#
# Pass --build-arg VITE_BUILD_HASH=$(git rev-parse --short HEAD) to stamp the build.
# A .env in the build context is picked up by build.sh for branding config.
FROM node:20-bookworm AS builder
FROM node:22-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends curl
RUN npm install -g pnpm@latest
RUN npm install -g pnpm@10.33.0
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm i
# Copy everything (including .env when present) - build.sh will source it
COPY . .
ARG VITE_BUILD_HASH
ENV VITE_BUILD_HASH=${VITE_BUILD_HASH}
RUN pnpm i --frozen-lockfile
ENV NODE_OPTIONS=--max_old_space_size=16384
COPY . .
RUN pnpm run build
FROM node:20-alpine
WORKDIR /app
# Install production dependencies needed by the Node server runtime
RUN npm install -g pnpm@10.33.0
COPY package.json pnpm-lock.yaml ./
RUN pnpm i --prod --frozen-lockfile --ignore-scripts
# Copy only the built output and server source - no app source, no .env, no dev deps
COPY --from=builder /app/build ./build
COPY --from=builder /app/server.js ./server.js
EXPOSE 3000
CMD ["node", "server.js"]
+2 -2
View File
@@ -37,12 +37,12 @@ pnpm run start
Or, if you prefer to use a container:
```sh
podman run -d -p 3000:3000 ghcr.io/coracle-social/flotilla:latest
docker run -d -p 3000:3000 gitea.coracle.social/coracle/flotilla:latest
```
Alternatively, you can copy the build files into a directory of your choice and serve it yourself:
```sh
mkdir ./mount
podman run -v ./mount:/app/mount ghcr.io/coracle-social/flotilla:latest bash -c 'cp -r build/* mount'
docker run -v ./mount:/app/mount gitea.coracle.social/coracle/flotilla:latest bash -c 'cp -r build/* mount'
```
+8
View File
@@ -247,6 +247,14 @@ app.use(
: "public, max-age=3600"
context.header("Cache-Control", cacheControl)
// Immutable assets are content-hashed by Vite, so the filename is itself a
// stable content identifier. Exposing it as an ETag lets clients that
// revalidate explicitly (e.g. emoji-picker-element checks its data source
// on every load) skip re-downloading large files when nothing changed.
if (isImmutable) {
context.header("ETag", `"${path.basename(filePath)}"`)
}
},
}),
)
+8
View File
@@ -423,10 +423,18 @@ progress[value]::-webkit-progress-value {
/* Keyboard open state adjustments */
body.keyboard-open {
--saib: 0px;
}
body.keyboard-open .hide-on-keyboard {
display: none;
}
body.keyboard-open .chat__compose {
margin-bottom: 0;
}
/* chat view */
.chat__compose {