Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
docker load < api-gateway.tar.gz

# Run the new container
docker run -d --name api-gateway --restart always api-gateway:latest
docker run -d --name api-gateway -e SPRING_PROFILES_ACTIVE=dev --restart always api-gateway:latest
5 changes: 2 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ COPY pom.xml ./
COPY src/ ./src

RUN chmod +x mvnw && \
# ./mvnw clean install
./mvnw install -DskipTests
# Package the application (this creates the JAR file)
RUN mvn clean package -DskipTests
Expand All @@ -18,10 +17,10 @@ FROM openjdk:23-jdk-slim
WORKDIR /app

# Copy the built JAR from the first stage
COPY --from=build /app/target/summonerssync.apigateway-0.0.1-SNAPSHOT.jar app.jar
COPY --from=build /app/target/summonerssync.apigateway-0.0.1-SNAPSHOT.jar ag-summoners-sync.jar

# Expose the port the app runs on
EXPOSE 8080

# Run Spring Boot app
CMD ["java", "-jar", "app.jar"]
CMD ["java", "-jar", "ag-summoners-sync.jar"]
12 changes: 9 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ services:
image: api-gateway:latest
ports:
- "8080:8080"
networks:
api_gateway_network:
ipv4_address: 172.17.0.2
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://database:5432/gatewaydb
SPRING_DATASOURCE_USERNAME: admin
SPRING_DATASOURCE_PASSWORD: admin
SPRING_PROFILES_ACTIVE: dev
networks:
api_gateway_network:
driver: bridge
ipam:
config:
- subnet: 172.17.0.2/16

Loading