Skip to content

Commit c04afba

Browse files
📝docs: docker compose project name (lobehub#4349)
1 parent 62cbf1c commit c04afba

File tree

8 files changed

+119
-93
lines changed

8 files changed

+119
-93
lines changed

docker-compose/local/docker-compose.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
name: lobe-chat-database
12
services:
23
network-service:
34
image: alpine
45
container_name: lobe-network
56
ports:
6-
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
7-
- '9001:9001' # MinIO Console
7+
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
8+
- '9001:9001' # MinIO Console
89
- '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
910
- '${LOBE_PORT}:3210' # LobeChat
1011
command: tail -f /dev/null
@@ -15,7 +16,7 @@ services:
1516
image: pgvector/pgvector:pg16
1617
container_name: lobe-postgres
1718
ports:
18-
- "5432:5432"
19+
- '5432:5432'
1920
volumes:
2021
- './data:/var/lib/postgresql/data'
2122
environment:
@@ -44,6 +45,7 @@ services:
4445
command: >
4546
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
4647
48+
4749
casdoor:
4850
image: casbin/casdoor
4951
container_name: lobe-casdoor
@@ -53,17 +55,17 @@ services:
5355
postgresql:
5456
condition: service_healthy
5557
environment:
56-
RUNNING_IN_DOCKER: "true"
57-
driverName: "postgres"
58-
dataSourceName: "user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor"
59-
origin: "http://localhost:${CASDOOR_PORT}"
60-
runmode: "dev"
58+
RUNNING_IN_DOCKER: 'true'
59+
driverName: 'postgres'
60+
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor'
61+
origin: 'http://localhost:${CASDOOR_PORT}'
62+
runmode: 'dev'
6163
volumes:
6264
- ./init_data.json:/init_data.json
6365

6466
lobe:
6567
image: lobehub/lobe-chat-database
66-
container_name: lobe-database
68+
container_name: lobe-chat
6769
network_mode: 'service:network-service'
6870
depends_on:
6971
postgresql:

docker-compose/local/logto/docker-compose.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
name: lobe-chat-database
12
services:
23
network-service:
34
image: alpine
45
container_name: lobe-network
56
ports:
6-
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
7-
- '9001:9001' # MinIO Console
7+
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
8+
- '9001:9001' # MinIO Console
89
- '${LOGTO_PORT}:${LOGTO_PORT}' # Logto
9-
- '3002:3002' # Logto Admin
10+
- '3002:3002' # Logto Admin
1011
- '${LOBE_PORT}:3210' # LobeChat
1112
command: tail -f /dev/null
1213
networks:
@@ -16,7 +17,7 @@ services:
1617
image: pgvector/pgvector:pg16
1718
container_name: lobe-postgres
1819
ports:
19-
- "5432:5432"
20+
- '5432:5432'
2021
volumes:
2122
- './data:/var/lib/postgresql/data'
2223
environment:
@@ -45,6 +46,7 @@ services:
4546
command: >
4647
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
4748
49+
4850
logto:
4951
image: svhd/logto
5052
container_name: lobe-logto
@@ -60,10 +62,9 @@ services:
6062
- 'ADMIN_ENDPOINT=http://localhost:3002'
6163
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
6264

63-
6465
lobe:
6566
image: lobehub/lobe-chat-database
66-
container_name: lobe-database
67+
container_name: lobe-chat
6768
network_mode: 'service:network-service'
6869
depends_on:
6970
postgresql:

docker-compose/local/setup.sh

+30-29
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# ======================
1010

1111
# 1. Default values of arguments
12-
# Arg: -f
12+
# Arg: -f
1313
# Determine force download asserts, default is not
1414
FORCE_DOWNLOAD=false
1515

@@ -33,10 +33,12 @@ while getopts "fl:-:" opt; do
3333
-)
3434
case "${OPTARG}" in
3535
lang)
36-
LANGUAGE="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
36+
LANGUAGE="${!OPTIND}"
37+
OPTIND=$(($OPTIND + 1))
3738
;;
3839
url)
39-
SOURCE_URL="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
40+
SOURCE_URL="${!OPTIND}"
41+
OPTIND=$(($OPTIND + 1))
4042
;;
4143
*)
4244
echo "Usage: $0 [-f] [-l language|--lang language] [--url source]" >&2
@@ -51,7 +53,6 @@ while getopts "fl:-:" opt; do
5153
esac
5254
done
5355

54-
5556
# ===============
5657
# == Variables ==
5758
# ===============
@@ -161,7 +162,7 @@ show_message() {
161162
;;
162163
esac
163164
;;
164-
esac
165+
esac
165166
}
166167

167168
# Function to download files
@@ -186,7 +187,7 @@ extract_file() {
186187
if [ $? -eq 0 ]; then
187188
echo "$file_name" $(show_message "extracted_success") "$target_dir"
188189
else
189-
echo "$file_name" $(show_message "extracted_failed")
190+
echo "$file_name" $(show_message "extracted_failed")
190191
exit 1
191192
fi
192193
else
@@ -198,30 +199,30 @@ extract_file() {
198199
# Define colors
199200
declare -A colors
200201
colors=(
201-
[black]="\e[30m"
202-
[red]="\e[31m"
203-
[green]="\e[32m"
204-
[yellow]="\e[33m"
205-
[blue]="\e[34m"
206-
[magenta]="\e[35m"
207-
[cyan]="\e[36m"
208-
[white]="\e[37m"
209-
[reset]="\e[0m"
202+
[black]="\e[30m"
203+
[red]="\e[31m"
204+
[green]="\e[32m"
205+
[yellow]="\e[33m"
206+
[blue]="\e[34m"
207+
[magenta]="\e[35m"
208+
[cyan]="\e[36m"
209+
[white]="\e[37m"
210+
[reset]="\e[0m"
210211
)
211212

212213
print_centered() {
213-
local text="$1" # Get input texts
214-
local color="${2:-reset}" # Get color, default to reset
215-
local term_width=$(tput cols) # Get terminal width
216-
local text_length=${#text} # Get text length
217-
local padding=$(( (term_width - text_length) / 2 )) # Get padding
218-
# Check if the color is valid
219-
if [[ -z "${colors[$color]}" ]]; then
220-
echo "Invalid color specified. Available colors: ${!colors[@]}"
221-
return 1
222-
fi
223-
# Print the text with padding
224-
printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text"
214+
local text="$1" # Get input texts
215+
local color="${2:-reset}" # Get color, default to reset
216+
local term_width=$(tput cols) # Get terminal width
217+
local text_length=${#text} # Get text length
218+
local padding=$(((term_width - text_length) / 2)) # Get padding
219+
# Check if the color is valid
220+
if [[ -z "${colors[$color]}" ]]; then
221+
echo "Invalid color specified. Available colors: ${!colors[@]}"
222+
return 1
223+
fi
224+
# Print the text with padding
225+
printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text"
225226
}
226227

227228
# Download files asynchronously
@@ -236,7 +237,7 @@ rm s3_data.tar.gz
236237

237238
# Display final message
238239
printf "\n%s\n\n" "$(show_message "tips_run_command")"
239-
print_centered "docker compose -p lobechat-starter up -d" "green"
240+
print_centered "docker compose up -d" "green"
240241
printf "\n%s" "$(show_message "tips_show_documentation")"
241242
printf "%s\n" $(show_message "tips_show_documentation_url")
242-
printf "\n\e[33m%s\e[0m\n" "$(show_message "tips_warning")"
243+
printf "\n\e[33m%s\e[0m\n" "$(show_message "tips_warning")"

docker-compose/local/zitadel/docker-compose.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
name: lobe-chat-database
12
services:
23
network-service:
34
image: alpine
45
container_name: lobe-network
56
ports:
6-
- '9000:9000' # MinIO API
7-
- '9001:9001' # MinIO Console
7+
- '9000:9000' # MinIO API
8+
- '9001:9001' # MinIO Console
89
- '8080:8080' # Zitadel Console
910
- '3210:3210' # LobeChat
1011
command: tail -f /dev/null
@@ -15,7 +16,7 @@ services:
1516
image: pgvector/pgvector:pg16
1617
container_name: lobe-postgres
1718
ports:
18-
- "5432:5432"
19+
- '5432:5432'
1920
volumes:
2021
- './data:/var/lib/postgresql/data'
2122
environment:
@@ -44,24 +45,23 @@ services:
4445
command: >
4546
server /etc/minio/data --address ":9000" --console-address ":9001"
4647
48+
4749
zitadel:
4850
restart: 'always'
4951
image: 'ghcr.io/zitadel/zitadel:latest'
5052
container_name: lobe-zitadel
5153
network_mode: 'service:network-service'
52-
command: start-from-init --config /zitadel-config.yaml --steps
53-
/zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ"
54-
--tlsMode disabled #MasterkeyNeedsToHave32Characters
54+
command: start-from-init --config /zitadel-config.yaml --steps /zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ" --tlsMode disabled #MasterkeyNeedsToHave32Characters
5555
volumes:
5656
- ./zitadel-config.yaml:/zitadel-config.yaml:ro
57-
- ./zitadel-init-steps.yaml:/zitadel-init-steps.yaml:ro
57+
- ./zitadel-init-steps.yaml:/zitadel-init-steps.yaml:ro
5858
depends_on:
5959
postgresql:
6060
condition: service_healthy
6161

6262
lobe:
6363
image: lobehub/lobe-chat-database
64-
container_name: lobe-database
64+
container_name: lobe-chat
6565
network_mode: 'service:network-service'
6666
depends_on:
6767
postgresql:

docker-compose/production/logto/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: lobe-chat-database
12
services:
23
postgresql:
34
image: pgvector/pgvector:pg16
@@ -52,7 +53,7 @@ services:
5253

5354
lobe:
5455
image: lobehub/lobe-chat-database
55-
container_name: lobe-database
56+
container_name: lobe-chat
5657
ports:
5758
- '3210:3210'
5859
depends_on:

docker-compose/production/zitadel/docker-compose.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: lobe-chat-database
12
services:
23
postgresql:
34
image: pgvector/pgvector:pg16
@@ -32,14 +33,13 @@ services:
3233
restart: always
3334
command: >
3435
server /etc/minio/data --address ":9000" --console-address ":9001"
35-
36+
37+
3638
zitadel:
3739
restart: always
3840
image: ghcr.io/zitadel/zitadel:latest
3941
container_name: lobe-zitadel
40-
command: start-from-init --config /zitadel-config.yaml --steps
41-
/zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ"
42-
--tlsMode external #MasterkeyNeedsToHave32Characters
42+
command: start-from-init --config /zitadel-config.yaml --steps /zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ" --tlsMode external #MasterkeyNeedsToHave32Characters
4343
ports:
4444
- 8080:8080
4545
volumes:
@@ -51,7 +51,7 @@ services:
5151

5252
lobe:
5353
image: lobehub/lobe-chat-database
54-
container_name: lobe-database
54+
container_name: lobe-chat
5555
ports:
5656
- '3210:3210'
5757
depends_on:

0 commit comments

Comments
 (0)