This repository contains the solution for the YG Travel Portal App. It contains Node/Express/Vue container for front end and API access and a PostGres database for storage. The containers are orchastrated with docker-compose. It is available within YG at https://travel.ynet.gov.yk.ca
- Run cp .env.base .env and replace 'ABC123' actual connection parameters
- In the root of the project run
docker-composer build
to build the containers and initalize the database. This will build 2 linked containers named: <> and < - Run `docker compose up -d to start the container the service
- Pull fresh code from the respository
- Run
docker-compose build
- Bring the service up with
docker-compose up -d
- Pull fresh code from the respository
- Run
docker-compose down --volumes
to take down the service and wipe any attached volumes - Run
docker-compose build
- Bring the service up with
docker-compose up -d
To create your locla develompment environment:
- Pull fresh code from the repository
- Run
docker-compose build
to build the various container - Bring the service up with
docker-compose up -d
- Ensure the docker container for the api and the database are running.
- Change into the
web
directory. - Run
npm run serve
to bring up a Vue development environment.
Remember to rebuild your docker containters before deloying your changes
The current configuration does not lend itself well to live API changes. Currently, the API docker container needs to be rebuilt for each change to the API configuration. To make API changes:
- Change in the
api
directory. - Make changes to app.js (or queries.js).
- Rebuild the docker container using the command
docker-compose build server
. - Launch the new changes by running
docker-compose up -d
. - Test your API changes using Postman, Insomnia or a similar tool.