-
Notifications
You must be signed in to change notification settings - Fork 1
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
6 changed files
with
47 additions
and
75 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
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,36 +1,23 @@ | ||
FROM debian:bullseye as builder | ||
|
||
ARG NODE_VERSION=16.15.1 | ||
|
||
RUN apt-get update; apt install -y curl python-is-python3 pkg-config build-essential | ||
RUN curl https://get.volta.sh | bash | ||
ENV VOLTA_HOME /root/.volta | ||
ENV PATH /root/.volta/bin:$PATH | ||
RUN volta install node@${NODE_VERSION} | ||
|
||
####################################################################### | ||
FROM node:18 as builder | ||
|
||
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 development | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
|
||
COPY . . | ||
RUN npm run build && rm -rf node_modules | ||
|
||
RUN npm install && npm run build | ||
FROM debian:bullseye | ||
####################################################################### | ||
|
||
FROM node:18 | ||
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 | ||
|
||
COPY --from=builder /app /app | ||
RUN npm install | ||
|
||
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 |
---|---|---|
@@ -1,44 +1,29 @@ | ||
app = "ofcra-presets" | ||
|
||
kill_signal = "SIGINT" | ||
kill_timeout = 5 | ||
processes = [] | ||
primary_region = "cdg" | ||
|
||
[env] | ||
MOD_DB_FILE = "/data/mods.json" | ||
|
||
[mounts] | ||
source="ofcra_presets_data" | ||
destination="/data" | ||
DBG = "0" | ||
MOD_DB_FILE = "/data/mods.json" | ||
|
||
[experimental] | ||
auto_rollback = true | ||
allowed_public_ports = [] | ||
# cmd = ["node", "--max-old-space-size=180", "server.js"] | ||
#[mounts] | ||
# source="ofcra_presets_data" | ||
# destination="/data" | ||
|
||
[[services]] | ||
http_checks = [] | ||
[http_service] | ||
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 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
|
||
[[services.ports]] | ||
handlers = ["tls", "http"] | ||
port = 443 | ||
[http_service.concurrency] | ||
type = "requests" | ||
soft_limit = 50 | ||
hard_limit = 100 | ||
|
||
[[services.tcp_checks]] | ||
[[http_service.checks]] | ||
grace_period = "10s" | ||
interval = "15s" | ||
restart_limit = 0 | ||
timeout = "2s" | ||
interval = "30s" | ||
method = "GET" | ||
timeout = "5s" | ||
path = "/" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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