Skip to content

Commit

Permalink
fix git history (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 authored and MasterEvarior committed Nov 6, 2024
1 parent a176aa5 commit 02342c4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
44 changes: 35 additions & 9 deletions docker/dev-with-prod/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,60 @@ include:
- ../docker-compose.yml
services:
spring:
tty: true
container_name: spring
build:
context: .
dockerfile: local-prod.Dockerfile
restart: always
environment:
SPRING_PROFILES_ACTIVE: staging
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK: debug
SPRING_FLYWAY_LOCATION: classpath:db/migration,classpath:db/data-migration,classpath:db/callback
SPRING_PROFILES_ACTIVE: dev
volumes:
- ../../../okr/backend/target:/app-root/backend
network_mode: "host"
depends_on:
maven-init:
condition: service_completed_successfully

maven:
tty: true
container_name: maven
restart: on-failure
image: maven:3.9.9-amazoncorretto-21
command: sh -c "mvn fizzed-watcher:run"
command: mvn fizzed-watcher:run
working_dir: /app-root/
volumes:
- ../../../okr:/app-root/
- ../../../okr:/app-root
- ~/.m2/repository:/root/.m2/repository
depends_on:
maven-init:
condition: service_completed_successfully

maven-init:
tty: true
container_name: maven-init
image: maven:3.9.9-amazoncorretto-21
command: mvn -B clean package -P build-for-docker,debug,no-formatter
working_dir: /app-root/
volumes:
- ../../../okr:/app-root
- ~/.m2/repository:/root/.m2/repository
depends_on:
angular:
condition: service_healthy

angular:
container_name: angular
image: node:22
user: "${UID:-1000}:${GID:-1000}"
tty: true
restart: on-failure
volumes:
- ../../../okr:/opt
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
command: [ "/bin/bash", "-c", "cd /opt/frontend && npm ci && npm run watch:prod" ]
command: [ "/bin/bash", "-c", "cd /opt/frontend && rm -rf dist && npm ci && npm run watch:prod" ]
healthcheck:
test: bash -c "[ -f /opt/frontend/dist/frontend/index.html ]"
interval: 10s
retries: 999
start_period: 30s
timeout: 10s

2 changes: 1 addition & 1 deletion docker/dev-with-prod/local-prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:3.20

USER root

RUN apk update && apk add --upgrade curl && apk --no-cache add openjdk17 inotify-tools
RUN apk update && apk add --upgrade curl && apk --no-cache add openjdk21 inotify-tools

RUN adduser --home /app-root --uid 1001 --disabled-password okr
USER 1001
Expand Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,4 @@
</plugins>
</pluginManagement>
</build>

</project>

0 comments on commit 02342c4

Please sign in to comment.