Skip to content

Commit

Permalink
优化docker-compose逻辑,不再需要手动初始化数据
Browse files Browse the repository at this point in the history
  • Loading branch information
cookieY committed Aug 19, 2022
1 parent 14e34a0 commit 7ef05b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ services:
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
MYSQL_ADDR: mysql
MYSQL_DB: yearning
SECRET_KEY: UkkKAdwHG7xXuRPt
SECRET_KEY: dbcjqheupqjsuwsm
IS_DOCKER: is_docker
ports:
- 8000:8000
# 首次使用请先初始化
#command: /bin/bash -c "./Yearning install"
#volumes:
# - ./conf.toml:/opt/conf.toml
command: /bin/bash -c "./Yearning install && ./Yearning run"
depends_on:
- mysql
restart: always
Expand Down
1 change: 0 additions & 1 deletion src/service/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func Migrate() {
return
}
}

_ = model.DB().AutoMigrate(&model.CoreAccount{})
_ = model.DB().AutoMigrate(&model.CoreDataSource{})
_ = model.DB().AutoMigrate(&model.CoreGlobalConfiguration{})
Expand Down

0 comments on commit 7ef05b8

Please sign in to comment.