Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN --mount=type=cache,id=workspace,target=/root/.local/share/pnpm/store pnpm in
# Build stage for the server.
FROM base AS build
# TODO: Remove this when we switch to an actual database.
ENV DATABASE_URL="file:./dev.db"
# ENV DATABASE_URL="file:./dev.db"
RUN \
# TODO: This initalizes the database. But we should probably remove this later.
pnpm --filter server prisma migrate reset --force && \
# pnpm --filter server prisma migrate reset --force && \
# Build the monorepo packages
pnpm build && \
# Generate the prisma client
Expand All @@ -48,6 +48,7 @@ FROM node:22-alpine AS server
WORKDIR /app
COPY --from=build /workspace/deployment/out .
# TODO: Remove this when we switch to an actual database.
ENV DATABASE_URL="file:./dev.db"
ENV DATABASE_URL="file:/mnt/hypergraph_data/production.sqlite"
RUN npm run prisma migrate deploy --skip-generate
EXPOSE 3030
CMD ["node", "dist/index.js"]
CMD ["sh", "-c", "npm run prisma migrate deploy && node dist/index.js"]
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"cors": "^2.8.5",
"effect": "^3.16.3",
"express": "^5.1.0",
"prisma": "^6.7.0",
"siwe": "^3.0.0",
"viem": "^2.29.0",
"ws": "^8.18.2"
Expand All @@ -31,7 +32,6 @@
"@types/node": "^22.15.15",
"@types/pg": "^8.15.0",
"@types/ws": "^8.18.1",
"prisma": "^6.7.0",
"tsup": "^8.4.0",
"typescript": "^5.8.3"
}
Expand Down
25 changes: 16 additions & 9 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ primary_region = 'fra'
[build]

[http_service]
internal_port = 3030
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
internal_port = 3030
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
memory = '1gb'
cpu_kind = 'shared'
cpus = 1

[mounts]
source = "hypergraph_data"
destination = "/mnt/hypergraph_data"

# [deploy]
# release_command = "/bin/sh -c 'npm run prisma migrate deploy --skip-generate'"
12 changes: 8 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading