prepare deploy
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
dist
|
||||
android
|
||||
ios
|
||||
.git
|
||||
.DS_Store
|
||||
*.log
|
||||
@@ -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)
|
||||
@@ -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
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user