Skip to content

Commit

Permalink
TM
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick80 committed Feb 18, 2024
1 parent 1b61cd2 commit 1db3333
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ FROM node:20-bookworm-slim as base
ENV NODE_ENV production

# Install openssl for Prisma
RUN apt-get update && apt-get install -y fuse3 openssl sqlite3 ca-certificates
RUN apt-get update && apt-get install -y fuse3 openssl ffmpeg sqlite3 ca-certificates procps python3 make g++


# Install all node_modules, including dev dependencies
FROM base as deps
Expand Down
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ processes = []
[mounts]
source = "data"
destination = "/data"

processes = ["app"]

[build]

Expand Down
14 changes: 7 additions & 7 deletions other/litefs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fuse:

data:
# Path to internal data storage.
dir: '/var/lib/litefs'
dir: '/data/litefs'

proxy:
# matches the internal_port in fly.toml
Expand All @@ -20,7 +20,7 @@ proxy:
# These environment variables will be available in your Fly.io application.
lease:
type: 'consul'
candidate: ${FLY_REGION == PRIMARY_REGION}
candidate: 'ord'
promote: true
advertise-url: 'http://${HOSTNAME}.vm.${FLY_APP_NAME}.internal:20202'

Expand All @@ -34,11 +34,11 @@ exec:

# re-enable these when this is fixed: https://github.com/superfly/litefs/issues/425
# # Set the journal mode for the database to WAL. This reduces concurrency deadlock issues
# - cmd: sqlite3 $DATABASE_PATH "PRAGMA journal_mode = WAL;"
# if-candidate: true
- cmd: sqlite3 $DATABASE_PATH "PRAGMA journal_mode = WAL;"
if-candidate: true

# # Set the journal mode for the cache to WAL. This reduces concurrency deadlock issues
# - cmd: sqlite3 $CACHE_DATABASE_PATH "PRAGMA journal_mode = WAL;"
# if-candidate: true
# Set the journal mode for the cache to WAL. This reduces concurrency deadlock issues
- cmd: sqlite3 $CACHE_DATABASE_PATH "PRAGMA journal_mode = WAL;"
if-candidate: true

- cmd: npm start
4 changes: 2 additions & 2 deletions other/setup-swap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

import { writeFile } from 'node:fs/promises'
import { $ } from 'execa'
import {$} from 'execa'
import {writeFile} from 'node:fs/promises'

console.log('setting up swapfile...')
await $`fallocate -l 512M /swapfile`
Expand Down

0 comments on commit 1db3333

Please sign in to comment.