Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix history #1124

Merged
merged 1 commit into from
Nov 4, 2024
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
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>
Loading