mirror of
https://github.com/System-End/haxmas-day-4.git
synced 2026-04-19 15:18:22 +00:00
fixes
This commit is contained in:
parent
1f83228190
commit
76e4790142
6 changed files with 41 additions and 3 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# flyctl launch added from .gitignore
|
||||
# deps
|
||||
**/node_modules
|
||||
**/.env
|
||||
**/my.db
|
||||
fly.toml
|
||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM oven/bun:1
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p /data
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["bun", "run", "src/index.ts"]
|
||||
1
bun.lock
1
bun.lock
|
|
@ -5,7 +5,6 @@
|
|||
"": {
|
||||
"name": "haxmas-day-4",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^12.5.0",
|
||||
"dotenv": "^17.2.3",
|
||||
"drizzle-orm": "^0.45.1",
|
||||
"hono": "^4.11.1",
|
||||
|
|
|
|||
20
fly.toml
Normal file
20
fly.toml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# fly.toml app configuration file generated for wishlist-api-hc on 2025-12-17T04:37:10-07:00
|
||||
#
|
||||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
|
||||
#
|
||||
|
||||
app = 'wishlist-api-hc'
|
||||
primary_region = 'lax'
|
||||
|
||||
[http_service]
|
||||
internal_port = 8080
|
||||
force_https = true
|
||||
auto_stop_machines = 'stop'
|
||||
auto_start_machines = true
|
||||
min_machines_running = 0
|
||||
processes = ['app']
|
||||
|
||||
[[vm]]
|
||||
memory = '1gb'
|
||||
cpus = 1
|
||||
memory_mb = 1024
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
"dev": "bun run --hot src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^12.5.0",
|
||||
"dotenv": "^17.2.3",
|
||||
"drizzle-orm": "^0.45.1",
|
||||
"hono": "^4.11.1"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import "dotenv/config";
|
||||
import { drizzle } from "drizzle-orm/bun-sqlite";
|
||||
import { Database } from "bun:sqlite";
|
||||
|
||||
export const db = drizzle(process.env.DB_FILE_NAME!);
|
||||
export const db = drizzle(new Database(process.env.DB_FILE_NAME!));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue