prepare deploy

This commit is contained in:
2026-02-06 02:25:54 +01:00
parent 468f80553f
commit 646836493f
5 changed files with 64 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
node_modules
dist
android
ios
.git
.DS_Store
*.log
+8
View File
@@ -0,0 +1,8 @@
# Secrets for Sanasto Wiki deployment
# DO NOT COMMIT SECRETS TO GIT! This file should read from environment or secure storage.
# Registry password (GitHub Container Registry token or Docker Hub password)
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
# Rails master key for credentials
RAILS_MASTER_KEY=$(cat config/master.key)
+8
View File
@@ -0,0 +1,8 @@
:80 {
root * /usr/share/caddy
file_server
try_files {path} /index.html
@assets path /assets/*
header @assets Cache-Control "public, max-age=31536000, immutable"
}
+14
View File
@@ -0,0 +1,14 @@
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM caddy:2.8-alpine
COPY --from=build /app/dist /usr/share/caddy
COPY ./Caddyfile /etc/caddy/Caddyfile
EXPOSE 80
+27
View File
@@ -0,0 +1,27 @@
# Name of your application. Used to uniquely configure containers.
service: sanasto-app
# Name of the container image.
image: soverein/sanasto-app
# Deploy to these servers.
servers:
web:
- app.rin.no
# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server.
proxy:
ssl: true
host: sanasto.app
app_port: 80
# Credentials for your image host.
registry:
server: git.rin.no
username: deploybot
password:
- KAMAL_REGISTRY_PASSWORD
# Configure builder setup.
builder:
arch: amd64