Skip to content

Commit e85032f

Browse files
committed
Build docker images using github actions
1 parent ac58080 commit e85032f

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

.github/workflows/botfest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
runs-on: ubuntu-latest
4141
needs: test
4242
if: github.ref == 'refs/heads/prod'
43+
permissions:
44+
packages: write
4345
steps:
4446
- name: Checkout repository
4547
uses: actions/checkout@v4

.github/workflows/panel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
publish:
1818
runs-on: ubuntu-latest
1919
if: github.ref == 'refs/heads/prod'
20+
permissions:
21+
packages: write
2022
steps:
2123
- name: Checkout repository
2224
uses: actions/checkout@v4

.github/workflows/platform_api.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
runs-on: ubuntu-latest
4141
needs: test
4242
if: github.ref == 'refs/heads/prod'
43+
permissions:
44+
packages: write
4345
steps:
4446
- name: Checkout repository
4547
uses: actions/checkout@v4

panel/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ ENV NODE_ENV=production
4242
RUN addgroup --system --gid 1001 nodejs
4343
RUN adduser --system --uid 1001 nextjs
4444

45-
COPY --from=builder /app/panel/public ./public
46-
4745
# Automatically leverage output traces to reduce image size
4846
# https://nextjs.org/docs/advanced-features/output-file-tracing
4947
COPY --from=builder --chown=nextjs:nodejs /app/panel/.next/standalone ./

platform_api/build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ tasks.bootRun {
9393
)
9494
}
9595

96-
tasks.createDockerfile { dependsOn("bootBuildImage") }
96+
tasks.createDockerfile { dependsOn("bootJar") }
9797
docker {
9898
generateOnBuild = false
9999

@@ -113,15 +113,18 @@ docker {
113113

114114
workdir("/app")
115115

116-
val filename = tasks.bootBuildImage.get().archiveFile.get()
116+
val filename = tasks.bootJar.get().archiveFile.get()
117117
.asFile.relativeTo(dockerfileLocation.parentFile)
118118
copy("$filename", "/app/app.jar")
119119

120120
runShell("mkdir -p /var/lib/platform/data")
121121

122-
env {
123-
add("SERVER_PORT", "8080")
124-
}
122+
add(object : DockerfileCommand() {
123+
override val keyword: String
124+
get() = "ENV"
125+
126+
override fun toString(): String = "ENV SERVER_PORT=8080"
127+
})
125128

126129
expose(8080)
127130
entryPointExec(

0 commit comments

Comments
 (0)