mirror of
https://github.com/kou029w/quot.git
synced 2025-01-18 08:05:08 +00:00
use DATABASE_URL
This commit is contained in:
parent
d5996574b6
commit
4a19964aaf
4 changed files with 56 additions and 4 deletions
13
.github/workflows/deploy.yml
vendored
Normal file
13
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
name: deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: superfly/flyctl-actions/setup-flyctl@master
|
||||
- run: flyctl deploy --local-only
|
||||
env:
|
||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
@ -5,9 +5,7 @@ services:
|
|||
restart: unless-stopped
|
||||
ports: ["8080:8080"]
|
||||
environment:
|
||||
PGRST_DB_URI: postgresql://postgres:${POSTGRES_PASSWORD}@/postgres?host=/var/run/postgresql
|
||||
PGRST_DB_SCHEMA: public
|
||||
PGRST_DB_ANON_ROLE: anon
|
||||
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@/postgres?host=/var/run/postgresql
|
||||
volumes:
|
||||
- postgres_socket:/var/run/postgresql
|
||||
depends_on: [db]
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
dbmate --url "${PGRST_DB_URI}" --wait up
|
||||
dbmate --wait up
|
||||
export PGRST_DB_URI="${PGRST_DB_URI:-${DATABASE_URL}}"
|
||||
export PGRST_DB_SCHEMA="${PGRST_DB_SCHEMA:-public}"
|
||||
export PGRST_DB_ANON_ROLE="${PGRST_DB_ANON_ROLE:-anon}"
|
||||
exec "$@"
|
||||
|
|
38
fly.toml
Normal file
38
fly.toml
Normal file
|
@ -0,0 +1,38 @@
|
|||
# fly.toml file generated for quot on 2022-08-28T22:39:37+09:00
|
||||
|
||||
app = "quot"
|
||||
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"
|
Loading…
Add table
Reference in a new issue