Skip to content

Commit

Permalink
Try to cloudbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvcc committed Oct 3, 2022
1 parent 0372790 commit f6b51a8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions infra/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
runtime: python310
service: backend
28 changes: 28 additions & 0 deletions infra/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
steps:
- name: ubuntu
entrypoint: bash
args:
- '-c'
- |
apt update
apt install python3 python3-pip -y
pip3 install poetry
poetry export >| requirements.txt
- name: ubuntu
entrypoint: bash
args:
- '-c'
- |
printenv >| .env
env:
- 'TYPESENSE_API_KEY=${_TYPESENSE_API_KEY}'
- 'SECRET_KEY=${_SECRET_KEY}'
- 'DEBUG=0'

- name: python
entrypoint: pip
args: [ "install", "-r", "requirements.txt" ]

- name: "gcr.io/cloud-builders/gcloud"
args: [ "app", "deploy", "--appyaml=infra/app.yaml" ]
4 changes: 4 additions & 0 deletions infra/dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# I'm not sure why I needed this for my DNS to work, but I'll keep it just in case
dispatch:
- url: "backend.sora-reader.app/*"
service: backend
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from manga_reader.wsgi import application

app = application

0 comments on commit f6b51a8

Please sign in to comment.