File tree Expand file tree Collapse file tree 6 files changed +47
-4
lines changed
Expand file tree Collapse file tree 6 files changed +47
-4
lines changed Original file line number Diff line number Diff line change 1+ *
2+ ! target /* -with-dependencies.jar
Original file line number Diff line number Diff line change 1616 - name : Checkout repository
1717 uses : actions/checkout@v4
1818
19+ - name : Set up QEMU
20+ uses : docker/setup-qemu-action@v3
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
1925 - name : Set up JDK
2026 uses : actions/setup-java@v4
2127 with :
3642 path : target/*-jar-with-dependencies.jar
3743 if-no-files-found : error
3844 retention-days : 7
45+
46+ - name : Build and push docker image [edge]
47+ run : docker buildx build --push -t ghcr.io/javabin/moresleep:edge --platform linux/amd64,linux/arm64 .
Original file line number Diff line number Diff line change 99.mvn /
1010src /main /kotlin /no /anksoft
1111.DS_Store
12- .env
12+ .env
13+ .postgres_data
Original file line number Diff line number Diff line change 1+ # Fetch the application jar from the target directory and rename it to application.jar
2+ FROM amazoncorretto:21-al2023-headless AS fetch
3+
4+ COPY target /target
5+ RUN mv /target/*-with-dependencies.jar /target/application.jar
6+
7+
8+ # Actual image to run the application
9+ FROM amazoncorretto:21-al2023-headless
10+
11+ EXPOSE 8082
12+ ENV RUN_FROM_JAR=true
13+
14+ COPY --from=fetch /target/application.jar /work/application.jar
15+
16+ RUN java -jar /work/application.jar
Original file line number Diff line number Diff line change @@ -2,8 +2,22 @@ name: moresleep
22
33services :
44 db :
5- build :
6- context : docker/postgres
7- dockerfile : Dockerfile
5+ build : docker/postgres
86 ports :
97 - " 5432:5432"
8+ volumes :
9+ - .postgres_data:/var/lib/postgresql/data
10+
11+ service :
12+ image : amazoncorretto:21-al2023-headless
13+ command : java -jar /src/target/moresleep-0.0.1-jar-with-dependencies.jar
14+ ports :
15+ - " 8082:8082"
16+ volumes :
17+ - ./:/src
18+ environment :
19+ - DBHOST=db
20+ - RUN_FROM_JAR=true
21+ env_file :
22+ - path : ./.env
23+ required : false
Original file line number Diff line number Diff line change 11FROM postgres:12.4
2+ EXPOSE 5432
23COPY postgressetup.sh /docker-entrypoint-initdb.d/init-user-db.sh
34ENV POSTGRES_PASSWORD bingo
You can’t perform that action at this time.
0 commit comments