Merge pull request #1 from jlengrand/feat/deploy-on-flydotio

Feat/deploy on flydotio
This commit is contained in:
julien Lengrand-Lambert
2022-11-07 15:33:44 +01:00
committed by GitHub
5 changed files with 86 additions and 1 deletions

17
.dockerignore Normal file
View File

@@ -0,0 +1,17 @@
# flyctl launch added from .gitignore
**/.idea
**/.DS_Store
**/config.ini
**/venv
**/.git
**/*.pyc
**/__pycache__
**/*.egg-info
**/dist
**/build
**/.vscode
**/.env

18
.github/workflows/fly.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Fly Deploy
on:
push:
branches:
- main
pull_request:
branches: [ master ]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only

11
Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM python:3.9-slim
COPY app/ /app
COPY requirements.txt /app/requirements.txt
EXPOSE 5000
WORKDIR /app
RUN pip install -r requirements.txt
CMD [ "python", "./app.py" ]

38
fly.toml Normal file
View File

@@ -0,0 +1,38 @@
# fly.toml file generated for checkout-create on 2022-11-07T15:12:40+01:00
app = "checkout-create"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[env]
[experimental]
allowed_public_ports = []
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"

View File

@@ -1,4 +1,5 @@
flask
Flask==2.2.2
Adyen == 6.0.0
python-dotenv===0.19.2
requests == 2.27.1
gunicorn==20.1.0