🍺 Yes. We have to drink. But we also have to pay. This is the drinking part.
To provide a consistent experience on every system, docker and docker-compose is used during development and production.
-
Install Docker and Docker Compose
-
Start the development server
make dev
This will start a development server on http://localhost:3000
-
Seed the database.
make dev-seed
The development setup uses an SQLite 3 database, which can be found under
/db/development.sqlite3
- Install WSL (Windows Subsystem for Linux)
- Follow the instructions for Linux/Unix above
- Install asdf
- Install dependencies:
asdf install
- Install gems:
bundle install
- Run:
yarn
- Migrate the db using
bundle exec rails db:migrate
- Seed the db using
bundle exec rails db:seed
- Start Tap by running
bundle exec rails s
You can generate a production docker image using:
make build
The image will be tagged under
tap:latest
Can I use Tap for development without setting up Tab?
Tap does not sync with Tab when in development mode. The user's balance is mocked by Ƶ12.34 instead.How do I login as the "Koelkast" user?
In development, you can login as Koelkast using the link: https://localhost:3000/sign_in?token=tokenI get a "mismatching_redirect_uri" error when trying to login
The Zeus authentication provider has a pre-configured list of hosts that are allowed to use the login. http://localhost:3000 is on this list and should be used for development.Docker image build is stuck on "Fetching gems..." or another command
If you are connected to the **`eduroam`** network, Docker build will not have access to the internet. This is because eduroam and docker use the same IP range, which causes conflicts. To solve this you can [reconfigure Docker to use a different IP range](https://support.skyformation.com/hc/en-us/articles/360009195759-How-To-Change-the-Docker-IP-address-space). A recommended range can be `172.31.248.0/21` which is rarely used by other networks.There are no transactions going from Tap to Tab
The delay job may not be running. You can start it using:sudo -u tap RAILS_ENV=production /home/tap/production/current/bin/delayed_job start