Skip to content

Commit f6b51a8

Browse files
committed
Try to cloudbuild
1 parent 0372790 commit f6b51a8

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

infra/app.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
runtime: python310
2+
service: backend

infra/cloudbuild.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
steps:
2+
- name: ubuntu
3+
entrypoint: bash
4+
args:
5+
- '-c'
6+
- |
7+
apt update
8+
apt install python3 python3-pip -y
9+
pip3 install poetry
10+
poetry export >| requirements.txt
11+
12+
- name: ubuntu
13+
entrypoint: bash
14+
args:
15+
- '-c'
16+
- |
17+
printenv >| .env
18+
env:
19+
- 'TYPESENSE_API_KEY=${_TYPESENSE_API_KEY}'
20+
- 'SECRET_KEY=${_SECRET_KEY}'
21+
- 'DEBUG=0'
22+
23+
- name: python
24+
entrypoint: pip
25+
args: [ "install", "-r", "requirements.txt" ]
26+
27+
- name: "gcr.io/cloud-builders/gcloud"
28+
args: [ "app", "deploy", "--appyaml=infra/app.yaml" ]

infra/dispatch.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# I'm not sure why I needed this for my DNS to work, but I'll keep it just in case
2+
dispatch:
3+
- url: "backend.sora-reader.app/*"
4+
service: backend

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from manga_reader.wsgi import application
2+
3+
app = application

0 commit comments

Comments
 (0)