An automatic drivers logbook-web-app
For more detailed information about how it works & looks - please have a look at the ODL.pdf documentation file!
We are working on a test-server so you can try it out, but have no ETA for this right now.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
are available at https://godoc.org/?q=https%3A%2F%2Fgithub.com%2FOpenDriversLog%2Fgoodl )
Sorry - the time is running out, there are some configurations to be made inside the code instead of central config files. Please make a global search for "YourServer" and "127.0.0.1" and check if you need to set up any addresses.
Makefile & Dockerfile magic
1st time setup
git clone ssh://email@example.com:OpenDriversLog/goodl.git
- the Repositories webfw, goodl-lib, goi18n & redistore must be located next to /goodl
- USE THE NEW MAKE TARGET
make update-depswithout sudo
- this does something similar to:
git clone ssh://firstname.lastname@example.org:OpenDriversLog/webfw.git
git clone ssh://email@example.com:OpenDriversLog/goodl-lib.git
git clone ssh://firstname.lastname@example.org:OpenDriversLog/redistore.git
git clone ssh://email@example.com:OpenDriversLog/goi18n.git
- USE THE NEW MAKE TARGET
- Create an empty directory "goodl-databases" with an empty "databases"-directory in it, also next to /goodl.
- The dockerimage needs several files, please create a folder "DONTADDTOGIT" with the files from "example-DONTADDTOGIT" and try to fill as much files as possible.
- deploy_private - a private key for deploying the docker-image
- gitlab.txt - Access token for an automatic account creating gitlab issues if a user submits an error report
- mail.txt - Password for your mailaddress to send error-mails if a user submits an error report
- client_secret.json -> Access secret for Google API https://console.developers.google.com/project/opendriverslog-web-app/apiui/credential for synching address books
- limesurvey.txt -> Password for limesurvey admin, if you want to create limesurvey invites in E-Mails.
Work Locally (after 1st time setup)
using the Makefile:
Optional / when needed
- checkout all develop branches of the repositorys listed under 1st time setup
make update-deps1.5 - when need -
sudo make start-redisYou only need to start redis once!
- build the docker-image
sudo make run-dev
- Visit http://localhost:4000/alpha/de/odl for the App. Current
sudo make dev-removestops & removes goodl-dev container. goodl_redis keeps spinning!
Are now managed using the Glide tool.
Whenever you need a new golang-library DO NOT NEVER use
go get but instead use
glide get github.com/whatever/youneed
from inside the
goodl/ directory inside the container.
mv ./vendor/ ./vendor_bak/
and wait till all libs get fetched.
They won't be commited to the repo, but will reside in on your machine (unless your delete the folder manually).
About the Docker images & containers
There are 3 different Dockerfiles & init-files in the /dockerize subfolder.
dev container, starts a Go CompileDaemon so you don't need to restart the container every time you make changes to the go-code. The CompileDaemon rebuilds the goodl-project using
go build /path/to/goodl whenever it see's change on
.c files. This should also rebuild the dependencies webfw & goodl-lib since they are mounted into the
vendor/ subfolder of goodl.
The Dockerfile.testing checks out the develop branch of each of the 3 main Repos. Dockerfile.prod shoult only be used by Jenkins to deploy to production.
Unit & Integration tests
jup, we got some too...
Use agouti A Golang acceptance testing framework. complemented by the Ginkgo BDD testing framework and Gomega matcher library
Acceptance tests (browser-gui tests) and its test-suite reside in
On Your Dev Machine
Usually, you don't want to run acceptance tests on your dev machine. Normally you just test it by hand. The only exception I see, is when you actually write those acceptence tests. In this case you most likely want to start them in your dev container manually.
sudo make run-teststo spawn your Selenium Hub with a node_chrome and node_firefox alongside
sudo make dev-test-compose-ffand/or
sudo make dev-test-compose-chromein different consoles to run the acceptence test suite 2.5 wait for tests to complete (takes about 10 minutes)
- (optional) The current application can be found at `localhost:4004/test/[lang]/odl/login
On -- the dead server --
Jenkins did that on goodl Merge Requests - now you need to do it manually again
run on your server
git clone ssh://firstname.lastname@example.org:OpenDriversLog/goodl.gitor
git pull origin/masterto get the latest changes.
sudo make build-server
sudo make remove-server
sudo make run-server
- open http://yourServer/alpha
-- the dead server -- run configs
how they are used by jenkins
masterbranch for internal use & testing
@docker run -d \ --name goodl_intern \ --link goodl_redis:redis \ -e ENVIRONMENT=intern \ -e SMTP_HOST=mail.opendriverslog.de \ -e SMTP_PORT=587 \ -v /srv/landingpage2/db/website-dev.sqlite3:/srv/landingpage2/db/website-dev.sqlite3 \ -v /srv/goodl-alpha/databases-intern:/databases \ -p 127.0.0.1:9004:4000 \ odl_go/goodl:latest
developmentbranch, internal, most likely unstable, newly started after each sucessfully tested & merged Merge Request on GoODL
docker run -d \ --name deploy_intern_dev \ -e ENVIRONMENT=dev-server \ -e SMTP_HOST=mail.opendriverslog.de \ -e SMTP_PORT=587 \ --link jenkins_goodl_redis:redis \ -v /srv/landingpage2/db/website-dev.sqlite3:/srv/landingpage2/db/website-dev.sqlite3 \ -v /srv/goodl-alpha/databases-intern:/databases \ -p 127.0.0.1:9003:4000 \ odl_jenkins/goodl_mr:live