Add postgres dialect
Cette révision appartient à :
Parent
9b38f61dc7
révision
5db874a2fa
2 fichiers modifiés avec 38 ajouts et 0 suppressions
|
@ -6,6 +6,7 @@ import (
|
||||||
"github.com/ewhal/nyaa/util/log"
|
"github.com/ewhal/nyaa/util/log"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
|
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||||
// _ "github.com/go-sql-driver/mysql"
|
// _ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
37
deploy/docker-compose.mysql.yml
Fichier normal
37
deploy/docker-compose.mysql.yml
Fichier normal
|
@ -0,0 +1,37 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
pantsu:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: deploy/Dockerfile
|
||||||
|
command: ./deploy/init.sh
|
||||||
|
depends_on:
|
||||||
|
- pantsu_db
|
||||||
|
env_file:
|
||||||
|
- mysql.env
|
||||||
|
environment:
|
||||||
|
- PANTSU_INTERNAL_PORT=${PANTSU_INTERNAL_PORT}
|
||||||
|
links:
|
||||||
|
- pantsu_db
|
||||||
|
ports:
|
||||||
|
# 0.0.0.0 makes it accessible to the network
|
||||||
|
# You may want to remove it to make pantsu available only
|
||||||
|
# to localhost
|
||||||
|
- 0.0.0.0:${PANTSU_EXTERNAL_PORT}:${PANTSU_INTERNAL_PORT}
|
||||||
|
volumes:
|
||||||
|
- "${GOPATH}:/go/"
|
||||||
|
- "./..:/nyaa"
|
||||||
|
|
||||||
|
pantsu_db:
|
||||||
|
env_file:
|
||||||
|
- mysql.env
|
||||||
|
image: mysql:5.7.18
|
||||||
|
volumes:
|
||||||
|
- "./../${PANTSU_MYSQL_DBFILE}:/docker-entrypoint-initdb.d/${PANTSU_MYSQL_DBFILE}"
|
||||||
|
|
||||||
|
pantsu_db_1:
|
||||||
|
image: mysql:5.7.18
|
||||||
|
env_file:
|
||||||
|
- mysql.env
|
||||||
|
links:
|
||||||
|
- pantsu_db
|
Référencer dans un nouveau ticket