Skip to content

Commit

Permalink
Created fly configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alxkp committed Sep 17, 2023
1 parent 8c61ff5 commit c0da345
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
3 changes: 3 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ LICENSE
.coverage
**/__pycache__/
tests/

# Fly config
fly.toml
28 changes: 28 additions & 0 deletions backend/fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# fly.toml app configuration file generated for clubs-backend on 2023-09-01T14:48:55-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "clubs-backend"
primary_region = "ewr"
# console_command = "/code/manage.py shell"

# [build]
# image = "pennlabs/penn-clubs-backend:latest"

# [deploy]
# strategy = "bluegreen"
# release_command = "python manage.py migrate"

[env]
# PORT = "80"
REDIS_HOST = "redis-clubs.internal"
# DOMAINS = "clubs-backend.internal,penn-clubs-frontend.internal,penn-clubs-frontend.fly.dev"
DOMAINS = "*"

[http_service]
internal_port = 80
force_https = false
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 1
18 changes: 18 additions & 0 deletions backend/redis/fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# fly.toml app configuration file generated for redis-clubs on 2023-09-14T21:50:56-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "redis-clubs"
primary_region = "ewr"

[build]
image = "redis:7.2.1"

[[mounts]]
source = "redis_clubs"
destination = "/data"

[metrics]
port = 9091
path = "/metrics"
3 changes: 2 additions & 1 deletion backend/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ omit = */tests/*, */migrations/*, */settings/*, */wsgi.py, */apps.py, */.venv/*,
source = .

[uwsgi]
http-socket = :80
http-socket = [::]:80
# https-socket = [::]:443
chdir = /app/
module = pennclubs.wsgi:application
master = true
Expand Down
20 changes: 20 additions & 0 deletions frontend/fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# fly.toml app configuration file generated for penn-clubs-frontend on 2023-09-01T14:14:37-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "penn-clubs-frontend"
primary_region = "ewr"

# [build]
# image = "pennlabs/penn-clubs-frontend:latest"

[env]
DOMAIN = "clubs-backend.internal"

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 1

0 comments on commit c0da345

Please sign in to comment.