Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

intesys/academy-12-factor-app

Repository files navigation

12 Factor Demo Deployment guide

Java fat jar

Download the jar from the releases page.

Create a configuration file (config/application.properties) with the following content

PORT=8080
CUSTOM_MESSAGE="Hello World From Configs"

# use the endpoint if you are using minio
AWS_ENDPOINT=http://localhost:9000
# use the region if you are using AWS S3
#AWS_REGION=us-east-1

AWS_ACCESS_KEY=myuser
AWS_SECRET_KEY=mypassword

Run the minio docker compose file

docker-compose -f src/main/docker/minio.yml up

Run the application

java -jar 12-factor-app.jar

Heroku

heroku create

git push heroku main

heroku config:set CUSTOM_MESSAGE="Hello World From Heroku"
heroku config:set AWS_ENDPOINT=""
heroku config:set AWS_REGION="eu-south-1"
heroku config:set AWS_ACCESS_KEY="AKIASJNI4DZVFRAFOE5H"
heroku config:set AWS_SECRET_KEY=""
heroku config:set AWS_BUCKET="twelve-factor-demo"

Docker Compose

Run the entire app using docker compose

docker-compose -f src/main/docker/12-factor.yml up

Kubernetes

Run the kustomization file

kubectl apply -k src/main/kubernetes/kustomization.yml