Skip to content

Commit

Permalink
Fix mariadb version
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcl committed Feb 28, 2020
1 parent 5928f9b commit 5e6a799
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mariadb:10
FROM mariadb:10.3

COPY custom.conf /etc/mysql
COPY initialize.sql /docker-entrypoint-initdb.d/
Expand Down
2 changes: 1 addition & 1 deletion db/initialize.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE USER `signpic`@`%`;
CREATE USER `signpic`@`%` IDENTIFIED BY 'password';
GRANT INSERT,SELECT,UPDATE,DELETE ON `signpic_db`.* TO `signpic`@`%`;

CREATE DATABASE IF NOT EXISTS `signpic_db`;
Expand Down
10 changes: 1 addition & 9 deletions web/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import (
"github.com/Team-Fruit/SignPicDB/web/handlers"
"github.com/Team-Fruit/SignPicDB/web/models"
"github.com/Team-Fruit/SignPicDB/web/ws"

"github.com/rakyll/statik/fs"
_ "github.com/Team-Fruit/SignPicDB/web/statik"
)

type (
Expand All @@ -40,14 +37,9 @@ func uuidValidator(fl validator.FieldLevel) bool {
}

func main() {
db := sqlx.MustConnect("mysql", "signpic:@tcp(db:3306)/signpic_db")
db := sqlx.MustConnect("mysql", "signpic:password@tcp(db:3306)/signpic_db")
defer db.Close()

_, err := fs.New()
if err != nil {
panic(err)
}

e := echo.New()

e.Use(middleware.Logger())
Expand Down

0 comments on commit 5e6a799

Please sign in to comment.