项目作者: luqmansen

项目描述 :
JavaServer Faces App
高级语言: Java
项目地址: git://github.com/luqmansen/jsf-ugly.git
创建时间: 2020-03-22T16:26:44Z
项目社区:https://github.com/luqmansen/jsf-ugly

开源协议:MIT License

下载


jsf-ugly

License: MIT
GitHub last commit
HitCount
Twitter

JavaServer Faces App

Demo

On Heroku (Broken, not fixed yet)

http://jsfu.herokuapp.com/

On EC2

(Sometimes went off)

http://54.174.72.185/

Requirements

For development
  • docker-compose
  • open jdk version 11
  • maven 3.6.3

Running

Pull image directly from Dockerhub using docker-compose

  1. wget https://git.io/JfKDM
  2. docker-compose up

Development

  1. git clone https://github.com/luqmansen/jsf-ugly.git && cd jsf-ugly
  2. make build
  3. make run

App will running on localhost:8080

Deployment

AWS EC2

  1. make sure docker installed on host
    1. apt install docker.io
  2. Download docker-compose script
    1. wget https://git.io/JfKDM
  3. Run!
    1. docker-compose up
    *) Make sure no app running on port 80 (eg. NGINX), otherwise you have to setup your reverse proxy

Heroku Container Registry

Note: This deployment currently broken, please refer to notes 1

  1. make sure heroku-cli installed
  2. Then refer to this official documentation

Notes

  • Currently the app depends on database that running on container, further update (not likely) will decouple the db configuration .
  • Image used in docker is tomcat slim version which is bare minimum tomcat.
    If you want to full tomcat version, use non slim version but make sure
    use version that support jdk 11.
    The configuration for tomcat manager available at ./conf folder

  • When running docker with docker run, env PORT is mandatory, because the container should be able to run flexibly on environment that have dynamic port assignment (like Heroku)

  • There is auto-push-image task on github action for every commit to Dockerhub and Heroku container registry with the credential specified as Github secrets.

Common Error

  • Maven target compiler error:

    Make sure your jdk version is correct, this project use version 11,
    if you you use another version, change it on pom.xml
  • Docker Image Not Updating:

    sometimes target folder cached by docker,
    so I remove that folder every maven build on the make build command.