.travis.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # .travis.yml
  2. language: minimal
  3. sudo: required
  4. services:
  5. - docker
  6. env:
  7. global:
  8. - REDIS_PASSWORD=PASSWORD
  9. - BACKEND_PORT=8080
  10. - FRONTEND_PORT=80
  11. - MONGO_PORT=27017
  12. - MONGO_ROOT_PASSWORD=PASSWORD_HERE
  13. - MONGO_USER_USERNAME=musare
  14. - MONGO_USER_PASSWORD=OTHER_PASSWORD_HERE
  15. - MONGOCLIENT_PORT=3000
  16. - REDIS_PORT=6379
  17. - COMPOSE_PROJECT_NAME=musare
  18. - FRONTEND_MODE=prod
  19. before_install:
  20. # create config files from template
  21. - cp backend/config/template.json backend/config/default.json
  22. - cp frontend/dist/config/template.json frontend/dist/config/default.json
  23. jobs:
  24. include:
  25. - stage: frontend
  26. script:
  27. - docker-compose build frontend # build frontend
  28. - docker-compose up -d frontend # start frontend
  29. - docker-compose exec frontend /bin/bash -c "cd app && npm run lint" # using eslint to check for formatting/linting issues
  30. - stage: backend # This will eventually be used for proper unit tests etc.
  31. script:
  32. - docker-compose up -d mongo # start mongo (users automatically setup)
  33. - docker-compose up -d redis # start redis
  34. - docker-compose build backend # build backend
  35. - docker-compose up -d backend # start backend