This is the repo that contains the code for the backend of All Aboard project for the Codurance Academy 2020 September edition.
You'll need to have the following installed:
mvn clean package
java -jar -Dspring.profiles.active=dev ./target/all-aboard-api-1.0.0.jar
Alternatively, for local development purposes application can be run using maven.
mvn spring-boot:run -Dspring-boot.run.profiles='dev'
The application is deployed to AWS Elastic Beanstalk. To do so, it requires an AWS S3 bucket to upload different JAR file versions. These components are provisioned automatically with Github Actions, as mentioned below (see Infrastructure as code).
This project uses GitHub Actions to provision and tear down environments where the application can be deployed to. They can be triggered with HTTP requests.
These requests need to be done with a GitHub token. Please refer to this link to create one. The token should be from an account with permissions to access this repo.
Please, see provisioning.yml to view this action's details.
curl --location --request POST 'https://api.github.com/repos/codurance/all-aboard-backend/dispatches' \
--header 'Accept: application/vnd.github.everest-preview+json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_GITHUB_TOKEN_HERE' \
--data-raw '{
"event_type": "provisioning"
}'
Please, see destroy.yml to view this action's details.
curl --location --request POST 'https://api.github.com/repos/codurance/all-aboard-backend/dispatches' \
--header 'Accept: application/vnd.github.everest-preview+json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_GITHUB_TOKEN_HERE' \
--data-raw '{
"event_type": "destroy"
}'
This is executed with GitHub Actions, too. The difference with the other actions lies on the fact that this is executed each time there is a push to the main
branch.
Please, see ci.yml to view this action's details.