mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-02-23 01:17:21 +08:00
fix(dockerfile): add webui
This commit is contained in:
parent
e5447280af
commit
3e1216eba2
28
.github/workflows/deploy.yml
vendored
28
.github/workflows/deploy.yml
vendored
@ -25,16 +25,30 @@ jobs:
|
||||
- name: Configure Docker for Google Cloud
|
||||
run: gcloud auth configure-docker
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo:$GITHUB_SHA .
|
||||
- name: Build Docker image for webui
|
||||
run: docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo-webui:$GITHUB_SHA -f Dockerfile .
|
||||
|
||||
- name: Push Docker image
|
||||
run: docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo:$GITHUB_SHA
|
||||
- name: Push Docker image for webui
|
||||
run: docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo-webui:$GITHUB_SHA
|
||||
|
||||
- name: Deploy to Cloud Run
|
||||
- name: Build Docker image for api
|
||||
run: docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo-api:$GITHUB_SHA -f Dockerfile .
|
||||
|
||||
- name: Push Docker image for api
|
||||
run: docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo-api:$GITHUB_SHA
|
||||
|
||||
- name: Deploy webui to Cloud Run
|
||||
run: |
|
||||
gcloud run deploy moneyprinterturbo \
|
||||
--image gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo:$GITHUB_SHA \
|
||||
gcloud run deploy moneyprinterturbo-webui \
|
||||
--image gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo-webui:$GITHUB_SHA \
|
||||
--platform managed \
|
||||
--region ${{ secrets.GCP_REGION }} \
|
||||
--allow-unauthenticated
|
||||
|
||||
- name: Deploy api to Cloud Run
|
||||
run: |
|
||||
gcloud run deploy moneyprinterturbo-api \
|
||||
--image gcr.io/${{ secrets.GCP_PROJECT_ID }}/moneyprinterturbo-api:$GITHUB_SHA \
|
||||
--platform managed \
|
||||
--region ${{ secrets.GCP_REGION }} \
|
||||
--allow-unauthenticated
|
||||
@ -2,16 +2,16 @@ x-common-volumes: &common-volumes
|
||||
- ./:/MoneyPrinterTurbo
|
||||
|
||||
services:
|
||||
# webui:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile
|
||||
# container_name: "webui"
|
||||
# ports:
|
||||
# - "8501:8501"
|
||||
# command: [ "streamlit", "run", "./webui/Main.py","--browser.serverAddress=127.0.0.1","--server.enableCORS=True","--browser.gatherUsageStats=False" ]
|
||||
# volumes: *common-volumes
|
||||
# restart: always
|
||||
webui:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: "webui"
|
||||
ports:
|
||||
- "8501:8501"
|
||||
command: [ "streamlit", "run", "./webui/Main.py","--browser.serverAddress=127.0.0.1","--server.enableCORS=True","--browser.gatherUsageStats=False" ]
|
||||
volumes: *common-volumes
|
||||
restart: always
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
|
||||
Loading…
Reference in New Issue
Block a user