Skip to content

Latest commit

 

History

History
95 lines (67 loc) · 2.4 KB

File metadata and controls

95 lines (67 loc) · 2.4 KB

Welcome to Docker Compose Java Server with Postgres 👋

Version Twitter: jaderphilipe

Project created for practice publish a Spring-boot Application with Java 17, docker and docker-compose

Build TransferApi Postgres Image

docker-compose -f .\docker-compose.db.yml build --no-cache

--no-cache *optional.

Start TransferApi Postgres Image

docker-compose -f .\docker-compose.db.yml up

Can be run with -d for detach console

Log running detached named-docker-service

docker logs -f named-docker-service

detach console docker container example = api-transfer

Build TransferApi Image

docker-compose -f .\docker-compose.api.yml build --no-cache

Start TransferApi Image

docker-compose -f .\docker-compose.api.yml up

Log running detached named-docker-service

docker logs -f named-docker-service

detach console docker container example = db-transfer

Alternatively, for the api, it can be started without building a image, for development purposes and practicality

Start TransferApi With Spring

mvn spring-boot:run

In order for the application connection work properly with the database, application.properties, line 11, must be edited from:

spring.datasource.url=jdbc:postgresql://db:5432/transferdb

to

spring.datasource.url=jdbc:postgresql://0.0.0.0:5432/transferdb

Documentation on Cli:

Author

👤 jadergermano jader.germano@icloud.com

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Search your support

Give a ⭐️ if this project helped you!