This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:latest | |
COPY dist/heroku /usr/share/nginx/html | |
COPY ./nginx/default.conf.template /etc/nginx/conf.d/default.conf.template | |
CMD ["/bin/bash", "-c", \ | |
"echo API_URL=[$API_URL], && \ | |
echo PORT=[$PORT], && \ | |
sed -i s#HEROKU_API_URL#$API_URL#g /usr/share/nginx/html/main.*.js && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ============================================================================= | |
# This script automatically splits the Heroku ENV DATABASE_URL variable | |
# into the three JDBC variables needed from Quarkus. | |
# | |
# It will only do the split if the DB_HEROKU_SPLIT is set to "true". | |
# | |
# If you set DB_HEROKU_SPLIT to 'false', you must pass the Quarkus parameters: | |
# - DB_JDBC_URL; | |
# - DB_JDBC_USER; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
services: | |
heroku-postgresql: | |
container_name: heroku-postgres | |
image: postgres:13.3 | |
environment: | |
- POSTGRES_PASSWORD=postgres | |
- POSTGRES_DB=postgres | |
- POSTGRES_USER=postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Database | |
quarkus.datasource.db-kind=postgresql | |
quarkus.datasource.jdbc.url=${DB_JDBC_URL} | |
quarkus.datasource.username=${DB_JDBC_USER:postgres} | |
quarkus.datasource.password=${DB_JDBC_PASSWORD:postgres} | |
quarkus.hibernate-orm.database.generation=drop-and-create | |
quarkus.hibernate-orm.sql-load-script=import.sql | |
# Port | |
quarkus.http.port=${PORT:8080} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import javax.annotation.security.RolesAllowed; | |
import javax.enterprise.context.RequestScoped; | |
import javax.inject.Inject; | |
import javax.ws.rs.Consumes; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; | |
import javax.ws.rs.Produces; |