convert frontend to use flyio

main
TZGyn 1 year ago
parent ee7d6f7718
commit 0af8751e9d
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -0,0 +1,15 @@
# flyctl launch added from .gitignore
**/.DS_Store
**/node_modules
build
.svelte-kit
package
**/.env
**/.env.*
!**/.env.example
**/vite.config.js.timestamp-*
**/vite.config.ts.timestamp-*
# flyctl launch added from node_modules/tailwindcss/stubs/.gitignore
!node_modules/tailwindcss/stubs/**/*
fly.toml

@ -12,7 +12,7 @@ RUN bun install
ARG DATABASE_URL
RUN bun run db:migrate
RUN DATABASE_URL=$DATABASE_URL bun run db:migrate
RUN bun run build

@ -0,0 +1,21 @@
# fly.toml app configuration file generated for kon-dashboard on 2024-08-12T12:07:06+08:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'kon-dashboard'
primary_region = 'iad'
[build]
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[[vm]]
size = 'shared-cpu-1x'
memory = '512mb'

@ -18,6 +18,7 @@ export const handle: Handle = async ({ event, resolve }) => {
const { session, user } = await lucia.validateSession(sessionId)
if (!user) {
event.locals.session = null
redirect(303, '/login')
}

Loading…
Cancel
Save