You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run --name my_postgres --network=network_name -e POSTGRES_PASSWORD=my_password -d postgres:13
sudo docker exec -it my_postgres psql -U postgres
CREATE DATABASE requests;
docker run —name requests_application p 8080:8080 --network=network_name -e SPRING_DATASOURCE_URL=jdbc:postgresql://my_postgres:5432/requests requests:latest
As result 2 docker containers
Also, to add instruction how to run application by docker compose!
The text was updated successfully, but these errors were encountered:
How to run requests application
First way.
./mvnw clean package
./mvnw jib:dockerBuild -Djib.to.image=requests -Djib.to.tags=latest
docker network create --driver bridge network_name
docker run --name my_postgres --network=network_name -e POSTGRES_PASSWORD=my_password -d postgres:13
sudo docker exec -it my_postgres psql -U postgres
CREATE DATABASE requests;
docker run —name requests_application p 8080:8080 --network=network_name -e SPRING_DATASOURCE_URL=jdbc:postgresql://my_postgres:5432/requests requests:latest
As result 2 docker containers
Also, to add instruction how to run application by docker compose!
The text was updated successfully, but these errors were encountered: