-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
888 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Dockerfile | ||
.dockerignore | ||
.git | ||
.gitignore | ||
.gitattributes | ||
README.md | ||
.npmrc | ||
.prettierrc | ||
.eslintrc.cjs | ||
.graphqlrc | ||
.editorconfig | ||
.svelte-kit | ||
.vscode | ||
node_modules | ||
build | ||
package | ||
**/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DATABASE_URL="postgresql:https://johndoe:randompassword@localhost:5432/mydb?schema=public" | ||
DATABASE_URL="postgresql:https://johndoe:randompassword@localhost:5432/mydb?schema=public" | ||
SALT="randomsalt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM node:18-alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json yarn.lock src/lib/server/prisma/schema.prisma ./ | ||
|
||
RUN yarn install --frozen-lockfile | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
FROM node:18-alpine | ||
|
||
WORKDIR /app | ||
|
||
RUN npm install -g prisma pm2 | ||
|
||
COPY scripts/ scripts/ | ||
COPY package.json yarn.lock process.yml src/lib/server/prisma/schema.prisma ./ | ||
|
||
RUN yarn install --frozen-lockfile --production | ||
|
||
COPY --from=builder /app/build build/ | ||
|
||
EXPOSE 3000 | ||
|
||
ENV NODE_ENV=production | ||
|
||
CMD [ "./scripts/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apps: | ||
- name: 'app' | ||
script: './build/index.js' | ||
instances: 'max' | ||
env: | ||
NODE_ENV: 'production' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
prisma migrate deploy | ||
pm2-runtime process.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.