Skip to content

Commit

Permalink
fix fly deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Apr 25, 2024
1 parent e444e62 commit 7382585
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM node:18-alpine
FROM node:20-alpine

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE $PORT
# necessary for small machines on fly.io to avoid crashing during npm install
ENV NODE_OPTIONS=--max_old_space_size=4096
CMD ["npm", "run", "start:prod" ]
2 changes: 2 additions & 0 deletions apps/backend/fly.production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

app = "serenity-api-production"
primary_region = "ams"
# necessary for small machines on fly.io to avoid running out of memory
swap_size_mb = 2048

[build]

Expand Down
2 changes: 2 additions & 0 deletions apps/backend/fly.staging.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

app = "serenity-api-staging"
primary_region = "ams"
# necessary for small machines on fly.io to avoid running out of memory
swap_size_mb = 2048

[build]

Expand Down

0 comments on commit 7382585

Please # to comment.