add fly conf
This commit is contained in:
parent
818140c9e4
commit
12f829e1ce
3 changed files with 78 additions and 0 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
node_modules
|
||||||
|
.git
|
37
Dockerfile
Normal file
37
Dockerfile
Normal file
|
@ -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" ]
|
37
fly.toml
Normal file
37
fly.toml
Normal file
|
@ -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"
|
Loading…
Reference in a new issue