- 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
- Finally, visit the link to test your site: http://localhost:8080/contextName
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