Skip to content

Commit

Permalink
Update docker file and compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Gram21 committed Dec 16, 2024
1 parent 27d3753 commit 7132e17
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ FROM eclipse-temurin:21-jre-alpine
RUN apk add --no-cache bash
COPY --from=build /build/target/rest-*.jar /app.jar
EXPOSE 8080
ENV SPRING_PROFILES_ACTIVE=docker

ENTRYPOINT ["java", "-jar", "/app.jar"]
24 changes: 9 additions & 15 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
version: "3.8"

services:
redis:
image: redis:7.4.0
image: redis
container_name: redis
restart: always
expose:
- "6379"
volumes:
- ./data:/data
command: ["redis-server", "--bind", "0.0.0.0", "--port", "6379"] # Bind to all interfaces
command: ["redis-server", "--bind", "0.0.0.0", "--port", "6379"]
networks:
- app-network

redisinsight:
image: redis/redisinsight:2.54
image: redis/redisinsight
container_name: redisinsight
restart: always
expose:
- '5540'
ports:
- '127.0.0.1:5540:5540'
depends_on:
- redis
volumes:
- redisinsight:/db
- ./redisinsight:/data
networks:
- app-network

app:
build:
context: . # Docker context, assuming Dockerfile is in the root
context: .
image: ghcr.io/ardoco/rest
container_name: ardoco-rest-api
restart: always
ports:
- "8080:8080"
- "127.0.0.1:8080:8080"
depends_on:
- redis
environment:
- SPRING_PROFILES_ACTIVE=docker # select active profile in spring
networks:
- app-network

volumes:
redisinsight:

networks:
app-network:
driver: bridge

0 comments on commit 7132e17

Please sign in to comment.