Skip to content

Commit

Permalink
update hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
dafengzhen committed Mar 18, 2024
1 parent 4af3d61 commit c1b9e4a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TAG=dev
PROFILES_ACTIVE=

# Database
DATABASE_NAME=youdeyiwu
DATABASE_ENDPOINT=youdeyiwu:3306
DATABASE_USERNAME=root
DATABASE_USERNAME=youdeyiwu
DATABASE_PASSWORD=123456
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
image: "youdeyiwu:${TAG}"
environment:
- SPRING_PROFILES_ACTIVE=${PROFILES_ACTIVE}
- SPRING_DATASOURCE_URL=jdbc:mysql://${DATABASE_ENDPOINT}/youdeyiwu?createDatabaseIfNotExist=true&serverTimezone=UTC&allowMultiQueries=true
- SPRING_DATASOURCE_URL=jdbc:mysql://${DATABASE_ENDPOINT}/${DATABASE_NAME}?createDatabaseIfNotExist=true&serverTimezone=UTC&allowMultiQueries=true
- SPRING_DATASOURCE_USERNAME=${DATABASE_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${DATABASE_PASSWORD}
build:
Expand Down
9 changes: 2 additions & 7 deletions hosting/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ TAG=dev
PROFILES_ACTIVE=

# Database
DATABASE_USERNAME=root
DATABASE_NAME=youdeyiwu
DATABASE_USERNAME=youdeyiwu
DATABASE_PASSWORD=123456

# Application url
Expand All @@ -17,15 +18,9 @@ NAME=Youdeyiwu
# Application description
DESCRIPTION=Youdeyiwu is an open-source lightweight forum

# Interface address
API_SERVER=http://localhost:8080

# Is it an HTTPS site
IS_HTTPS_SITE=false

# Allowed source domain(s) for sending requests, multiple domains separated by commas
SERVER_ACTIONS_ALLOWED_ORIGINS=

# Set the remotePatterns to allow images, in the format of an array
# IMAGES_REMOTE_PATTERNS_0_PROTOCOL=https
# IMAGES_REMOTE_PATTERNS_0_HOSTNAME=example.com
Expand Down
11 changes: 7 additions & 4 deletions hosting/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
environment:
- TAG
- PROFILES_ACTIVE
- DATABASE_NAME
- DATABASE_ENDPOINT=youdeyiwu:3306
- DATABASE_USERNAME
- DATABASE_PASSWORD
Expand All @@ -35,7 +36,7 @@ services:
- DESCRIPTION
- API_SERVER=http://youdeyiwu:8080
- IS_HTTPS_SITE
- SERVER_ACTIONS_ALLOWED_ORIGINS
- SERVER_ACTIONS_ALLOWED_ORIGINS=youdeyiwu:8080
- SHOW_FOOTER
- IMAGES_REMOTE_PATTERNS_0_PROTOCOL
- IMAGES_REMOTE_PATTERNS_0_HOSTNAME
Expand All @@ -59,7 +60,9 @@ services:
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USERNAME}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
ports:
- '3306:3306'
networks:
Expand All @@ -70,7 +73,7 @@ networks:
name: youdeyiwu

volumes:
logs:
name: youdeyiwu_logs
db:
name: youdeyiwu_db
logs:
name: youdeyiwu_logs
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spring.docker.compose.enabled = false

# datasource
spring.datasource.url = jdbc:mysql://youdeyiwu:3306/youdeyiwu?createDatabaseIfNotExist=true&serverTimezone=UTC&allowMultiQueries=true
spring.datasource.username = root
spring.datasource.username = youdeyiwu
spring.datasource.password = 123456
spring.datasource.type = com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name = DatebookHikariCP
Expand Down

0 comments on commit c1b9e4a

Please sign in to comment.