-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #dev add dev-deploy file and other (#199)
* dev deploy preparations * kodemy.sh deploy file * fix :#dev-deploy services config fix * fix :#dev-deploy search config fix * Create dev-deploy.yml * Update dev-deploy.yml * Update dev-deploy.yml * fix: #dev-deploy script --------- Co-authored-by: Marcin Bator <[email protected]>
- Loading branch information
1 parent
95ad8c7
commit ce2c0f7
Showing
16 changed files
with
159 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: [ "dev-deploy" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.REMOTE_HOST }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
port: ${{ secrets.REMOTE_PORT }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
script: | | ||
cd /home/kodemy/KodemyBackend/ | ||
git checkout dev-deploy | ||
git pull || { echo "Error: git pull failed" >&2; exit 1; } | ||
./kodemy.sh | ||
echo "$(date): backend deployed successfully" >> deploy-log.txt | ||
docker system prune -f |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE SCHEMA IF NOT EXISTS "kodemy-auth"; | ||
CREATE SCHEMA IF NOT EXISTS "kodemy-backend"; | ||
CREATE SCHEMA IF NOT EXISTS "kodemy-notification"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
FROM gradle:8.8.0-jdk17 AS gradle_build | ||
COPY --chown=gradle:gradle build.gradle settings.gradle /home/gradle/project/ | ||
COPY --chown=gradle:gradle gradle /home/gradle/project/gradle | ||
WORKDIR /home/gradle/project | ||
RUN gradle dependencies --no-daemon | ||
|
||
COPY --chown=gradle:gradle . /home/gradle/project | ||
WORKDIR /home/gradle/project | ||
RUN gradle build --no-daemon -x test | ||
|
||
FROM openjdk:17.0.2-slim-buster AS runtime | ||
EXPOSE 8080 | ||
COPY --from=gradle_build /home/gradle/project/build/libs/*.jar /app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
COPY build/libs/kodemy-api-gateway.jar /app.jar | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
FROM gradle:8.8.0-jdk17 AS gradle_build | ||
COPY --chown=gradle:gradle build.gradle settings.gradle /home/gradle/project/ | ||
COPY --chown=gradle:gradle gradle /home/gradle/project/gradle | ||
WORKDIR /home/gradle/project | ||
RUN gradle dependencies --no-daemon | ||
|
||
COPY --chown=gradle:gradle . /home/gradle/project | ||
WORKDIR /home/gradle/project | ||
RUN gradle build --no-daemon -x test | ||
|
||
FROM openjdk:17.0.2-slim-buster AS runtime | ||
EXPOSE 8080 | ||
COPY --from=gradle_build /home/gradle/project/build/libs/*.jar /app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
COPY build/libs/kodemy-auth.jar /app.jar | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
FROM gradle:8.8.0-jdk17 AS gradle_build | ||
COPY --chown=gradle:gradle build.gradle settings.gradle /home/gradle/project/ | ||
COPY --chown=gradle:gradle gradle /home/gradle/project/gradle | ||
WORKDIR /home/gradle/project | ||
RUN gradle dependencies --no-daemon | ||
|
||
COPY --chown=gradle:gradle . /home/gradle/project | ||
WORKDIR /home/gradle/project | ||
RUN gradle build --no-daemon -x test | ||
|
||
FROM openjdk:17.0.2-slim-buster AS runtime | ||
EXPOSE 8080 | ||
COPY --from=gradle_build /home/gradle/project/build/libs/*.jar /app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
COPY build/libs/kodemy-backend.jar /app.jar | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
FROM gradle:8.8.0-jdk17 AS gradle_build | ||
COPY --chown=gradle:gradle build.gradle settings.gradle /home/gradle/project/ | ||
COPY --chown=gradle:gradle gradle /home/gradle/project/gradle | ||
WORKDIR /home/gradle/project | ||
RUN gradle dependencies --no-daemon | ||
|
||
COPY --chown=gradle:gradle . /home/gradle/project | ||
WORKDIR /home/gradle/project | ||
RUN gradle build --no-daemon -x test | ||
|
||
FROM openjdk:17.0.2-slim-buster AS runtime | ||
EXPOSE 8080 | ||
COPY --from=gradle_build /home/gradle/project/build/libs/*.jar /app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
COPY build/libs/kodemy-notification.jar /app.jar | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
FROM gradle:8.8.0-jdk17 AS gradle_build | ||
COPY --chown=gradle:gradle build.gradle settings.gradle /home/gradle/project/ | ||
COPY --chown=gradle:gradle gradle /home/gradle/project/gradle | ||
WORKDIR /home/gradle/project | ||
RUN gradle dependencies --no-daemon | ||
|
||
COPY --chown=gradle:gradle . /home/gradle/project | ||
WORKDIR /home/gradle/project | ||
RUN gradle build --no-daemon -x test | ||
|
||
FROM openjdk:17.0.2-slim-buster AS runtime | ||
EXPOSE 8080 | ||
COPY --from=gradle_build /home/gradle/project/build/libs/*.jar /app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] | ||
COPY build/libs/kodemy-search.jar /app.jar | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM openjdk:17.0.2-slim-buster AS runtime | ||
EXPOSE 8761 | ||
COPY build/libs/kodemy-service-registry.jar /app.jar | ||
ENTRYPOINT ["java", "-jar", "/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ plugins { | |
} | ||
|
||
group = 'pl.sknikod' | ||
version = '0.0.1-SNAPSHOT' | ||
|
||
java { | ||
toolchain { | ||
|
Empty file.
Oops, something went wrong.