Update the docker-compose deployment script (#360)

* Update the docker-compose deployment script

* fix typo

* Update docker compose fba_ui conf

* Update the docker compose fba_ui conf

* Add docker compose image repository name

* Update docker compose fba_ui comment
This commit is contained in:
Wu Clan
2024-07-21 09:55:39 +08:00
committed by GitHub
parent 9752ce8e92
commit f9c4028c60
2 changed files with 35 additions and 1 deletions
@@ -18,6 +18,8 @@ OPERA_LOG_ENCRYPT_SECRET_KEY='d77b25790a804c2b4a339dd0207941e4cefa5751935a33735b
# OAuth2
OAUTH2_GITHUB_CLIENT_ID='test'
OAUTH2_GITHUB_CLIENT_SECRET='test'
OAUTH2_LINUX_DO_CLIENT_ID='test'
OAUTH2_LINUX_DO_CLIENT_SECRET='test'
# Task
# Celery
CELERY_BROKER_REDIS_DATABASE=1
@@ -24,6 +24,7 @@ services:
build:
context: ../../../
dockerfile: backend/backend.dockerfile
image: fba_server:latest
container_name: fba_server
restart: always
depends_on:
@@ -77,7 +78,7 @@ services:
- fba_network
# The backend is dedicated, which conflicts with fba_uiIf you choose to use fba_ui
# you should stop using fba_nginx container
# you should stop using fba_nginx container and use fba_ui container
fba_nginx:
image: nginx
ports:
@@ -92,6 +93,36 @@ services:
networks:
- fba_network
# # If the server memory is less than 4GB and CPU less than four cores
# # it is recommended to build this container separately: docker-compose build fba_ui
# # You can also go to fba_ui project and build it individuallyhowever,
# # that make sure to create the docker network before the build: docker network create fba_network
# fba_ui:
# build:
# context: /root/fastapi_best_architecture_ui
# dockerfile: Dockerfile
# image: fba_ui:latest
# ports:
# - "80:80"
# - "443:443"
# container_name: fba_ui
# restart: always
# depends_on:
# - fba_server
# command:
# - nginx
# - -g
# - daemon off;
# volumes:
# # nginx https conf
# # When deploying through docker, you need to open this configuration item and
# # ensure that the docker_ssl path is consistent with that in nginx conf
# # - local_ssl_pem_path:/etc/ssl/xxx.pem
# # - local_ssl_key_path:/etc/ssl/xxx.key
# - fba_static:/www/fba_server/backend/static
# networks:
# - fba_network
fba_rabbitmq:
hostname: fba_rabbitmq
image: rabbitmq:3.12.7
@@ -112,6 +143,7 @@ services:
build:
context: ../../../
dockerfile: backend/celery.dockerfile
image: fba_celery:latest
ports:
- "8555:8555"
container_name: fba_celery