Skip to content

Commit

Permalink
Set up for Fly deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nbudin committed Dec 12, 2023
1 parent 29c9159 commit 0db6f8b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
build-args: |
RUBY_VERSION=${{ steps.ruby-version.outputs.ruby-version }}
NODE_VERSION=${{ steps.node-version.outputs.node-version }}
REVISION=${{ github.sha }}
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
update-release-draft:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ ENV LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2
FROM ${TARGETARCH}_jemalloc as production
ARG NODE_VERSION
ARG TARGETARCH
ARG REVISION

ENV RAILS_ENV production
ENV NODE_ENV production
ENV REVISION ${REVISION}

USER root
RUN useradd -ms /bin/bash www
Expand Down
40 changes: 40 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# fly.toml app configuration file generated for larp-library on 2023-12-12T10:43:31-08:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "larp-library"
primary_region = "iad"
swap_size_mb = 512

[build]
image = "neinteractiveliterature/larp_library:latest"

[deploy]
release_command = "bundle exec rails release:perform"

[env]
ASSETS_HOST = "assets.larplibrary.org"
CLOUDWATCH_LOG_GROUP = "larp_library_production"
INTERCODE_URL = "https://www.neilhosting.net"
LANG = "en"
PORT = 8080
RACK_ENV = "production"
RAILS_ENV = "production"
RAILS_LOG_TO_STDOUT = "enabled"
RAILS_MAX_THREADS = "4"
RAILS_SERVE_STATIC_FILES = "enabled"
ROLLBAR_CLIENT_ACCESS_TOKEN = "6f641698f7534a4e85bb632b75f111bc"

[http_service]
auto_start_machines = true
auto_stop_machines = true
force_https = true
internal_port = 8080
min_machines_running = 0
processes = ["app"]

[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 512

0 comments on commit 0db6f8b

Please sign in to comment.