Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
ADDED: docker compose for full deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
AleixMT committed Jan 16, 2024
1 parent 9830e3e commit 992e8dc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
25 changes: 19 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
version: "2.1"
services:
#book-a-book-buscador:
# image: aleixmt/book-a-book-buscador:latest
# ports:
# - "0.0.0.0:8082:8081"
book-a-book-buscador:
image: aleixmt/book-a-book-buscador:latest
ports:
- "0.0.0.0:8082:8081"
#restart: unless-stopped

book-a-book-operador:
Expand All @@ -19,7 +19,7 @@ services:
- "0.0.0.0:8762:8761"
restart: unless-stopped

postgres_db:
postgres_operador:
image: postgres
environment:
- PUID=1001
Expand All @@ -29,5 +29,18 @@ services:
- POSTGRES_USER=aleixmt
- POSTGRES_DB=book-a-book-operador
ports:
- "0.0.0.0:5433:5432"
- "0.0.0.0:5434:5432"
restart: unless-stopped

postgres_buscador:
image: postgres
environment:
- PUID=1001
- PGID=1001
- TZ=Etc/UTC
- POSTGRES_PASSWORD=chemistry
- POSTGRES_USER=aleixmt
- POSTGRES_DB=book-a-book-buscador
ports:
- "0.0.0.0:5433:5432"
restart: unless-stopped
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
<scope>test</scope>
</dependency>

<!-- Eureka Client dependency -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>4.1.0</version>
</dependency>

<!-- For swagger in Spring Boot 3 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.3.0</version>
</dependency>

<!-- Eureka Client dependency -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>4.1.0</version>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
####################################

# Set connection to the desired table of DB using URL
spring.datasource.url=jdbc:postgresql://postgres_db:5432/book-a-book-operador
spring.datasource.url=jdbc:postgresql://postgres_operador:5432/book-a-book-operador

# Database credentials
spring.datasource.username=aleixmt
Expand Down

0 comments on commit 992e8dc

Please sign in to comment.