Merge branch 'master' of ssh://git.andreafazzi.eu:10022/andrea/oef

This commit is contained in:
Andrea Fazzi 2020-01-20 16:05:23 +01:00
commit 8dfa3b7ed8
11 changed files with 57 additions and 11 deletions

View file

@ -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/

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,6 @@
MYSQL_ROOT_PASSWORD=oef
MYSQL_PASSWORD=oef
MYSQL_DATABASE=oef_test
MYSQL_DATABASE=oef_dev
MYSQL_USER=oef

View file

@ -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

View file

@ -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:

View 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"

View 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"

View file

@ -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 {

View file

@ -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

1 RegionID Code Name Address Email SchoolContactPersonFirstname SchoolContactPersonFirstname SchoolContactPersonLastname ContestDirectorFirstname ContestDirectorLastname
2 ABRUZZO CHTF016012 ISTITUTO TECNO INDUSTRIALE "U. POMILIO" VIA COLONNETTA 124 foo@school.org Rani Jarvie Jerrie Duell
3 ABRUZZO CHIS01600D U. POMILIO CHIETI VIA COLONNETTA 124 foo@school.org Stanislas Proffer Lovell Courtier
4 ABRUZZO CHPM014019 "R. PANTINI" VIA MADONNA DELL'ASILO 39 foo@school.org Stephie Adamsky Druci Haversham

View file

@ -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>