Skip to content

Commit

Permalink
Merge pull request #11 from micheltlutz/release/fly
Browse files Browse the repository at this point in the history
config to deploy on fly
  • Loading branch information
micheltlutz authored Jan 8, 2024
2 parents 027271e + 903a4f4 commit 6506ada
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
5 changes: 1 addition & 4 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import os

from dotenv import load_dotenv
from fastapi import FastAPI
Expand All @@ -21,8 +20,7 @@
app = FastAPI()


print(os.getenv("PROJECT_NAME"))

# print(os.getenv("PROJECT_NAME"))

# title=config("PROJECT_NAME")
# CORS
Expand All @@ -34,7 +32,6 @@
allow_headers=["*"],
)


def init_db():
try:
Base.metadata.create_all(bind=engine)
Expand Down
22 changes: 22 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for dev-challenge on 2024-01-08T16:24:31-03:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "dev-challenge"
primary_region = "gru"

[build]

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

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

0 comments on commit 6506ada

Please sign in to comment.