Compare commits
11 Commits
fix/ci-onl
...
36eb377583
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36eb377583 | ||
|
|
b8f0c7ecba | ||
|
|
0034e0b8b3 | ||
|
|
d9a7409f9c | ||
|
|
358e07b1d5 | ||
|
|
5df914a40f | ||
|
|
1f8002629f | ||
|
|
ff2e4586f3 | ||
|
|
019867f1fa | ||
|
|
48d49a068a | ||
| 11f81cfd8e |
@@ -15,7 +15,7 @@ jobs:
|
||||
if: "!startsWith(github.event.head_commit.message, 'chore: bump version')"
|
||||
env:
|
||||
REGISTRY: registry.digitalocean.com/lunarfront
|
||||
GIT_REMOTE: git2.lunarfront.tech
|
||||
GIT_REMOTE: git.lunarfront.tech
|
||||
DOCKER_HOST: tcp://localhost:2375
|
||||
|
||||
steps:
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
git config user.name "lunarfront-bot"
|
||||
git config user.email "bot@lunarfront.tech"
|
||||
git remote set-url origin https://lunarfront-bot:${{ secrets.BOT_TOKEN }}@$GIT_REMOTE/ryan/lunarfront-app.git
|
||||
git add packages/backend/package.json
|
||||
git add packages/backend/package.json chart/Chart.yaml chart/values.yaml
|
||||
git commit -m "chore: bump version to v${{ steps.version.outputs.version }}"
|
||||
git pull --rebase origin main
|
||||
git push origin main
|
||||
|
||||
@@ -21,7 +21,7 @@ RUN bun build src/main.ts --compile --outfile /app/server \
|
||||
--define "process.env.APP_VERSION='${APP_VERSION}'"
|
||||
|
||||
FROM alpine:3.21
|
||||
RUN addgroup -S app && adduser -S app -G app
|
||||
RUN apk add --no-cache libstdc++ && addgroup -S app && adduser -S app -G app
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/server ./server
|
||||
COPY --from=build /app/packages/backend/src/db/migrations ./migrations
|
||||
|
||||
@@ -3,4 +3,4 @@ name: lunarfront
|
||||
description: LunarFront small business management platform
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "0.0.0"
|
||||
appVersion: "0.1.0"
|
||||
|
||||
@@ -38,6 +38,36 @@ spec:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: redis-url
|
||||
- name: REDIS_KEY_PREFIX
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: redis-key-prefix
|
||||
- name: SPACES_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: spaces-key
|
||||
- name: SPACES_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: spaces-secret
|
||||
- name: SPACES_BUCKET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: spaces-bucket
|
||||
- name: SPACES_ENDPOINT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: spaces-endpoint
|
||||
- name: SPACES_PREFIX
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lunarfront-secrets
|
||||
key: spaces-prefix
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-valkey
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "lunarfront.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}-valkey
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}-valkey
|
||||
spec:
|
||||
containers:
|
||||
- name: valkey
|
||||
image: "{{ .Values.valkey.image.repository }}:{{ .Values.valkey.image.tag }}"
|
||||
ports:
|
||||
- containerPort: {{ .Values.valkey.port }}
|
||||
resources:
|
||||
{{- toYaml .Values.valkey.resources | nindent 12 }}
|
||||
@@ -1,13 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-valkey
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "lunarfront.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Release.Name }}-valkey
|
||||
ports:
|
||||
- port: {{ .Values.valkey.port }}
|
||||
targetPort: {{ .Values.valkey.port }}
|
||||
@@ -1,7 +1,7 @@
|
||||
backend:
|
||||
image:
|
||||
repository: registry.digitalocean.com/lunarfront/lunarfront-app
|
||||
tag: latest
|
||||
tag: 0.0.27
|
||||
pullPolicy: Always
|
||||
port: 8000
|
||||
resources:
|
||||
@@ -15,7 +15,7 @@ backend:
|
||||
frontend:
|
||||
image:
|
||||
repository: registry.digitalocean.com/lunarfront/lunarfront-frontend
|
||||
tag: latest
|
||||
tag: 0.0.27
|
||||
pullPolicy: Always
|
||||
port: 80
|
||||
resources:
|
||||
@@ -26,19 +26,6 @@ frontend:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
|
||||
valkey:
|
||||
image:
|
||||
repository: valkey/valkey
|
||||
tag: "8"
|
||||
port: 6379
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
|
||||
ingress:
|
||||
host: ""
|
||||
className: nginx
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lunarfront/backend",
|
||||
"version": "0.0.26",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -9,7 +9,8 @@ declare module 'fastify' {
|
||||
|
||||
export const redisPlugin = fp(async (app) => {
|
||||
const redisUrl = process.env.REDIS_URL ?? 'redis://localhost:6379'
|
||||
const redis = new Redis(redisUrl)
|
||||
const keyPrefix = process.env.REDIS_KEY_PREFIX ? `${process.env.REDIS_KEY_PREFIX}:` : ''
|
||||
const redis = new Redis(redisUrl, { keyPrefix })
|
||||
|
||||
app.decorate('redis', redis)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user