-
Notifications
You must be signed in to change notification settings - Fork 30
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
Jeff Ma
committed
Jan 12, 2023
1 parent
5a1377c
commit e0a8a2f
Showing
6 changed files
with
60 additions
and
14 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,4 @@ | ||
Dockerfile | ||
.dockerignore | ||
node_modules | ||
.git |
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ pids | |
node_modules | ||
|
||
# Env vars | ||
.env | ||
.env* | ||
|
||
# Redis database | ||
*.rdb | ||
|
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 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Using node 16 | ||
FROM node:16-slim | ||
|
||
####################################################################### | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# NPM will not install any package listed in "devDependencies" when NODE_ENV is set to "production", | ||
# to install all modules: "npm install --production=false". | ||
# Ref: https://docs.npmjs.com/cli/v9/commands/npm-install#description | ||
|
||
ENV NODE_ENV production | ||
|
||
COPY . . | ||
COPY .env.prod .env | ||
|
||
RUN npm install | ||
|
||
LABEL fly_launch_runtime="nodejs" | ||
|
||
# COPY --from=builder /root/.volta /root/.volta | ||
# COPY --from=builder /app /app | ||
|
||
# WORKDIR /app | ||
# ENV NODE_ENV production | ||
# ENV PATH /root/.volta/bin:$PATH | ||
|
||
CMD [ "npm", "run", "start" ] |
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
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