-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
3 changed files
with
78 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM debian:bullseye as builder | ||
|
||
ARG NODE_VERSION=19.7.0 | ||
|
||
RUN apt-get update; apt install -y curl | ||
RUN curl https://get.volta.sh | bash | ||
ENV VOLTA_HOME /root/.volta | ||
ENV PATH /root/.volta/bin:$PATH | ||
RUN volta install node@${NODE_VERSION} | ||
|
||
####################################################################### | ||
|
||
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 . . | ||
|
||
RUN npm install | ||
FROM debian:bullseye | ||
|
||
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 | ||
ENV PORT 8080 | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# fly.toml file generated for y-webrtc-eu on 2023-03-16T15:02:47+01:00 | ||
|
||
app = "y-webrtc-eu" | ||
kill_signal = "SIGINT" | ||
kill_timeout = 5 | ||
processes = [] | ||
|
||
[env] | ||
|
||
[experimental] | ||
auto_rollback = true | ||
|
||
[[services]] | ||
http_checks = [] | ||
internal_port = 8080 | ||
processes = ["app"] | ||
protocol = "tcp" | ||
script_checks = [] | ||
[services.concurrency] | ||
hard_limit = 25 | ||
soft_limit = 20 | ||
type = "connections" | ||
|
||
[[services.ports]] | ||
force_https = true | ||
handlers = ["http"] | ||
port = 80 | ||
|
||
[[services.ports]] | ||
handlers = ["tls", "http"] | ||
port = 443 | ||
|
||
[[services.tcp_checks]] | ||
grace_period = "1s" | ||
interval = "15s" | ||
restart_limit = 0 | ||
timeout = "2s" |