From 7ef05b86b100075ef577ad7fb6211759175aa8ee Mon Sep 17 00:00:00 2001 From: HenryYee Date: Fri, 19 Aug 2022 16:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96docker-compose=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=88=9D=E5=A7=8B=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-compose.yml | 6 ++---- src/service/migrate.go | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 2215f50f..d3898738 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -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 diff --git a/src/service/migrate.go b/src/service/migrate.go index b10240ac..aafc9432 100644 --- a/src/service/migrate.go +++ b/src/service/migrate.go @@ -62,7 +62,6 @@ func Migrate() { return } } - _ = model.DB().AutoMigrate(&model.CoreAccount{}) _ = model.DB().AutoMigrate(&model.CoreDataSource{}) _ = model.DB().AutoMigrate(&model.CoreGlobalConfiguration{})