Merge branch 'master' of ssh://git.andreafazzi.eu:10022/andrea/oef
This commit is contained in:
commit
8dfa3b7ed8
11 changed files with 57 additions and 11 deletions
|
@ -4,7 +4,7 @@ ENV PATH=$PATH:/src/oef/
|
|||
RUN mkdir -p /src/oef
|
||||
ADD . /src/oef
|
||||
|
||||
COPY config/config.yaml /src/oef/config/
|
||||
# COPY config/config.yaml /src/oef/config/
|
||||
|
||||
WORKDIR /src/oef/
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -9,6 +9,6 @@ dev:
|
|||
docker-compose -f compose/docker-compose_outside_docker.yml down
|
||||
docker-compose -f compose/docker-compose_outside_docker.yml up -d db
|
||||
docker-compose -f compose/docker-compose_outside_docker.yml up -d smtp
|
||||
go run -race main.go --config=config/config_outside_docker.yaml &
|
||||
go run -race main.go --config=config/config_dev.yaml &
|
||||
|
||||
all: dockerized
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# OEF development branch
|
||||
# OEF - Dev Branch
|
||||
|
||||
This is the development branch of the web platform for the "Olimpiadi
|
||||
di Economia e Finanza".
|
||||
This is the development branch of the web platform for the "Olimpiadi di Economia e Finanza".
|
||||
|
||||
# License
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MYSQL_ROOT_PASSWORD=oef
|
||||
MYSQL_PASSWORD=oef
|
||||
MYSQL_DATABASE=oef_test
|
||||
MYSQL_DATABASE=oef_dev
|
||||
MYSQL_USER=oef
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ services:
|
|||
- DB_PORT=3306
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ../config/config.yaml:/src/oef/config/config.yaml
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
|
@ -18,7 +19,7 @@ services:
|
|||
restart: always
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
# - ./sql:/docker-entrypoint-initdb.d
|
||||
env_file:
|
||||
- db.env
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ services:
|
|||
- DB_PORT=3306
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./config/config.yaml:/src/oef/config/config.yaml
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
|
@ -18,7 +19,7 @@ services:
|
|||
restart: always
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
# - ./sql:/docker-entrypoint-initdb.d
|
||||
env_file:
|
||||
- db.env
|
||||
ports:
|
||||
|
|
17
config/config.yaml.example
Normal file
17
config/config.yaml.example
Normal file
|
@ -0,0 +1,17 @@
|
|||
url: "http://localhost:3000"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
|
||||
keys:
|
||||
cookie_store_key: "something-very-secret"
|
||||
jwt_signing_key: "secret"
|
||||
|
||||
orm:
|
||||
connection: "oef:oef@tcp(db:3306)/oef_test"
|
||||
options: "charset=utf8&parseTime=True&loc=Local"
|
||||
automigrate: true
|
||||
regenerate: false
|
||||
|
||||
admin:
|
||||
username: "admin"
|
||||
password: "admin"
|
28
config/config_dev.yaml.example
Normal file
28
config/config_dev.yaml.example
Normal file
|
@ -0,0 +1,28 @@
|
|||
url: "http://localhost:3000"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
|
||||
keys:
|
||||
cookie_store_key: "something-very-secret"
|
||||
jwt_signing_key: "secret"
|
||||
|
||||
orm:
|
||||
connection: "oef:oef@tcp(localhost:3307)/oef_test"
|
||||
options: "charset=utf8&parseTime=True&loc=Local"
|
||||
automigrate: true
|
||||
regenerate: false
|
||||
|
||||
admin:
|
||||
username: "admin"
|
||||
password: "admin"
|
||||
|
||||
subscriber:
|
||||
password: "subscribe"
|
||||
|
||||
smtp:
|
||||
host: "localhost"
|
||||
port: 1025
|
||||
username: ""
|
||||
password: ""
|
||||
from: "no-reply@olimpiadi-economiaefinanza.it"
|
||||
bcc: "bcc@fake.org"
|
|
@ -394,7 +394,7 @@ func (h *Handlers) Read(model interface{}) http.Handler {
|
|||
func (h *Handlers) modelHandler(model string, pattern config.PathPattern) http.Handler {
|
||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Replace "api" prefix
|
||||
// Replace the "api" prefix.
|
||||
pattern.PathPattern = strings.Replace(pattern.PathPattern, "/api", "", -1)
|
||||
|
||||
switch r.Method {
|
||||
|
|
2
scripts/import/testdata/schools.csv
vendored
2
scripts/import/testdata/schools.csv
vendored
|
@ -1,4 +1,4 @@
|
|||
RegionID,Code,Name,Address,Email,SchoolContactPersonFirstname,SchoolContactPersonFirstname,ContestDirectorFirstname,ContestDirectorLastname
|
||||
RegionID,Code,Name,Address,Email,SchoolContactPersonFirstname,SchoolContactPersonLastname,ContestDirectorFirstname,ContestDirectorLastname
|
||||
ABRUZZO,CHTF016012,"ISTITUTO TECNO INDUSTRIALE ""U. POMILIO""",VIA COLONNETTA 124,foo@school.org,Rani,Jarvie,Jerrie,Duell
|
||||
ABRUZZO,CHIS01600D,U. POMILIO CHIETI,VIA COLONNETTA 124,foo@school.org,Stanislas,Proffer,Lovell,Courtier
|
||||
ABRUZZO,CHPM014019,"""R. PANTINI""",VIA MADONNA DELL'ASILO 39,foo@school.org,Stephie,Adamsky,Druci,Haversham
|
||||
|
|
|
|
@ -35,7 +35,7 @@
|
|||
<footer class="footer text-center">
|
||||
<div class="container">
|
||||
<span class="text-center text-muted">Questo software è stato sviluppato da <a href="https://github.com/remogatto">Andrea
|
||||
Fazzi</a> per le <a href="https://www.olimpiadi-economiaefinanza.it">Olimpiadi di Economia e Finanza 2020</a>
|
||||
Fazzi</a> per le <a href="https://www.olimpiadi-economiaefinanza.it">Olimpiadi di Economia e Finanza 2020</a> (development version)
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
Loading…
Reference in a new issue