jacoblindev / springboot-wildfly-jsp-demo

Demo project for Spring Boot + JSP + WildFly deployment on Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Boot + JSP + PostgreSQL + WildFly

For Development (Run Server Locally)

  • Start a local postgresql db for the app to connect with! Using docker to start the database:
docker run --name local-postgres -p 5432:5432 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=password -e POSTGRES_DB=localdev -d postgres
  • Make sure your application.properties 's database url is set to "localhost":
spring.datasource.url=jdbc:postgresql://localhost:5432/localdev
  • Then run the following cmd to create/build a local server with WildFly that contains our application:
mvn clean package   

# Then run the server locally
./target/server/bin/standalone.sh 

For Deployment (Run Docker Deployment with WildFly + PostgreSQL)

After you finish developing, make sure you already build local server by running mvn clean package.

Then, just run the docker-compose.yml to see it deploy as docker containers.

docker-compose up --build

About

Demo project for Spring Boot + JSP + WildFly deployment on Docker.


Languages

Language:Java 96.6%Language:Dockerfile 3.4%