Compare commits
13 Commits
fix/ci-onl
...
fe29e548fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe29e548fb | ||
|
|
3d72f04b14 | ||
|
|
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')"
|
if: "!startsWith(github.event.head_commit.message, 'chore: bump version')"
|
||||||
env:
|
env:
|
||||||
REGISTRY: registry.digitalocean.com/lunarfront
|
REGISTRY: registry.digitalocean.com/lunarfront
|
||||||
GIT_REMOTE: git2.lunarfront.tech
|
GIT_REMOTE: git.lunarfront.tech
|
||||||
DOCKER_HOST: tcp://localhost:2375
|
DOCKER_HOST: tcp://localhost:2375
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
git config user.name "lunarfront-bot"
|
git config user.name "lunarfront-bot"
|
||||||
git config user.email "bot@lunarfront.tech"
|
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 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 commit -m "chore: bump version to v${{ steps.version.outputs.version }}"
|
||||||
git pull --rebase origin main
|
git pull --rebase origin main
|
||||||
git push 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}'"
|
--define "process.env.APP_VERSION='${APP_VERSION}'"
|
||||||
|
|
||||||
FROM alpine:3.21
|
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
|
WORKDIR /app
|
||||||
COPY --from=build /app/server ./server
|
COPY --from=build /app/server ./server
|
||||||
COPY --from=build /app/packages/backend/src/db/migrations ./migrations
|
COPY --from=build /app/packages/backend/src/db/migrations ./migrations
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ name: lunarfront
|
|||||||
description: LunarFront small business management platform
|
description: LunarFront small business management platform
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
appVersion: "0.0.0"
|
appVersion: "0.1.0"
|
||||||
|
|||||||
@@ -38,6 +38,36 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: lunarfront-secrets
|
name: lunarfront-secrets
|
||||||
key: redis-url
|
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
|
- name: JWT_SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
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:
|
backend:
|
||||||
image:
|
image:
|
||||||
repository: registry.digitalocean.com/lunarfront/lunarfront-app
|
repository: registry.digitalocean.com/lunarfront/lunarfront-app
|
||||||
tag: latest
|
tag: 0.0.27
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
port: 8000
|
port: 8000
|
||||||
resources:
|
resources:
|
||||||
@@ -15,7 +15,7 @@ backend:
|
|||||||
frontend:
|
frontend:
|
||||||
image:
|
image:
|
||||||
repository: registry.digitalocean.com/lunarfront/lunarfront-frontend
|
repository: registry.digitalocean.com/lunarfront/lunarfront-frontend
|
||||||
tag: latest
|
tag: 0.0.27
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
port: 80
|
port: 80
|
||||||
resources:
|
resources:
|
||||||
@@ -26,19 +26,6 @@ frontend:
|
|||||||
cpu: 200m
|
cpu: 200m
|
||||||
memory: 128Mi
|
memory: 128Mi
|
||||||
|
|
||||||
valkey:
|
|
||||||
image:
|
|
||||||
repository: valkey/valkey
|
|
||||||
tag: "8"
|
|
||||||
port: 6379
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 64Mi
|
|
||||||
limits:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 128Mi
|
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
host: ""
|
host: ""
|
||||||
className: nginx
|
className: nginx
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lunarfront/backend",
|
"name": "@lunarfront/backend",
|
||||||
"version": "0.0.26",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ declare module 'fastify' {
|
|||||||
|
|
||||||
export const redisPlugin = fp(async (app) => {
|
export const redisPlugin = fp(async (app) => {
|
||||||
const redisUrl = process.env.REDIS_URL ?? 'redis://localhost:6379'
|
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)
|
app.decorate('redis', redis)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user