Your fast track to restaurants that are nearby from Chalmers Campus Johanneberg and Campus Lindholmen!
mat.chalmers.it gives IT students the ability to review restaurants and voice their opinion to let other people know about where you can get the best food.
The easiest way to get started is via docker!
docker-compose up --build
docker-compose.yml sets up the following dependencies:
Docker can be unforgiving when trying to update dependencies.
frontend folder, and run yarn install, or go into backend and run npm install for the backend.docker-compose rm. This will remove your volumes and any previously saved data.docker-compose build --force-rm --no-cache mat-frontend mat-backend.After that, you can just run docker-compose up to get started again.
If you have to change form validation, do not forget to update it both in the frontend and the backend. In the frontend it's in frontend/src/validation, and in the backend it's in backend/src/controllers/validation. Note that text and error messages are not necessary for the backend validation.
What's needed to run mat in production is:
Right now there's no migration script installed on mat.chalmers.it. You'll have to do it manually. Just don't forget to make a backup before starting. In the future, there should be SQL files for migration in /database/migration.
The frontend has as of right now the gamma URL hardcoded to https://gamma.chalmers.it.
Environment variables for the backend:
DB_HOST, DB_PORT, DB_USER, DB_DATABASE, DB_PASSWORD: Connecting to a PostgreSQL database.REDIS_HOST, REDIS_PORT: Connecting to a Redis instance.MAT_COOKIE_NAME, MAT_COOKIE_SECRET, MAT_COOKIE_AGE, MAT_COOKIE_DOMAIN: Cookie settings. See session.js for default settings.MAT_PORT: Port that the backend will run on. Default is 8080.mat.chalmers.it is designed with usage with Gamma. Note that the defaults are matched with the values in docker-compose.yml for ease to start developing locally.
GAMMA_AUTHORITY: The name of the gamma authority. Default is admin.GAMMA_API_KEY: API key from Gamma. Default is key.GAMMA_CLIENT_ID, GAMMA_CLIENT_SECRET: Id and secret of the client from Gamma. Default is id/secret.GAMMA_BASE_URL: URL to gamma. Should be https://gamma.chalmers.it is production, otherwise, the default is used which points to the docker image.GAMMA_ME_URI: Default /users/me.GAMMA_TOKEN_URI: Default /oauth/token.GAMMA_USERS_URI: Default: /users/minified/.GAMMA_AUTHORIZATION_URL: Should be the full URL, probably: https://mat.chalmers.it/api/oauth/authorize. Default: http://localhost:8081/api/oauth/authorize.GAMMA_REDIRECT_URL: Should as well be the full URL, probably: https://gamma.chalmers.it/api/auth/account/callback. Default http://localhost:3001/auth/account/callback.Content type
Image
Digest
Size
8 MB
Last updated
over 7 years ago
docker pull cthit/mat-frontend