From 70e30f7ac0d12f403391ce10fe66ee32f7eaa54f Mon Sep 17 00:00:00 2001 From: Araozu Date: Sun, 6 Oct 2024 21:59:20 -0500 Subject: [PATCH] fix: jenkins --- Jenkinsfile | 2 +- docker-compose.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3d6e5e5..3cc2a18 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { steps { sh 'rm .env || true' sh 'echo "PORT=8007" >> .env' - sh 'echo "DB_HOST=localhost" >> .env' + sh 'echo "DB_HOST=music-to-go-db" >> .env' sh 'echo "DB_PORT=5432" >> .env' sh 'echo "DB_DATABASE=music" >> .env' sh 'echo "DB_USERNAME=root" >> .env' diff --git a/docker-compose.yml b/docker-compose.yml index b5fbb7b..cca91e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,17 @@ services: music-to-go: container_name: music-to-go + depends_on: + - music-to-go-db build: context: . dockerfile: Dockerfile ports: - "8007:8007" restart: unless-stopped + networks: + - music-to-go-network + music-to-go-db: image: postgres container_name: music-to-go-db @@ -18,4 +23,10 @@ services: environment: POSTGRES_USER: root POSTGRES_PASSWORD: root + networks: + - music-to-go-network + +networks: + music-to-go-network: + driver: bridge