Compare commits
No commits in common. "1a7cb6f055ca687532d449ba0d3da6ac294c7193" and "18ab41ed093088c87547717045820c092c229ff2" have entirely different histories.
1a7cb6f055
...
18ab41ed09
4 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ COPY ./ui .
|
||||||
RUN npm run build-only
|
RUN npm run build-only
|
||||||
|
|
||||||
# Stage 3: Create the jlink app
|
# Stage 3: Create the jlink app
|
||||||
FROM docker.io/eclipse-temurin:19-jdk-alpine
|
FROM docker.io/eclipse-temurin:20-jdk-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=maven /app/target/dchat-*-fat.jar /app/dchat.jar
|
COPY --from=maven /app/target/dchat-*-fat.jar /app/dchat.jar
|
||||||
COPY --from=vuejs /app/dist /app/ui/dist
|
COPY --from=vuejs /app/dist /app/ui/dist
|
||||||
|
|
|
@ -14,7 +14,6 @@ services:
|
||||||
- POSTGRES_PASSWORD=<postgres-password>
|
- POSTGRES_PASSWORD=<postgres-password>
|
||||||
- POSTGRES_URL=jdbc:postgresql://db:5432/dchat
|
- POSTGRES_URL=jdbc:postgresql://db:5432/dchat
|
||||||
- API_PORT=8080
|
- API_PORT=8080
|
||||||
- JDK_JAVA_OPTIONS="--enable-preview"
|
|
||||||
db:
|
db:
|
||||||
image: docker.io/postgres:15-alpine
|
image: docker.io/postgres:15-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class DiscordBot implements Runnable {
|
||||||
.setToken(discordApiKey)
|
.setToken(discordApiKey)
|
||||||
.login()
|
.login()
|
||||||
.join();
|
.join();
|
||||||
Runtime.getRuntime().addShutdownHook(Thread.ofVirtual().unstarted(() -> {
|
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||||
logger.info("Shutting down Discord application");
|
logger.info("Shutting down Discord application");
|
||||||
discordApi.disconnect();
|
discordApi.disconnect();
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -60,7 +60,8 @@ public class Main {
|
||||||
public void run() {
|
public void run() {
|
||||||
logger.info("Starting services...");
|
logger.info("Starting services...");
|
||||||
try (var executor = Executors.newFixedThreadPool(2)) {
|
try (var executor = Executors.newFixedThreadPool(2)) {
|
||||||
executor.submit(dbMigrator).get(); // Waiting for migrations
|
var migrationResult = executor.submit(dbMigrator);
|
||||||
|
migrationResult.get();
|
||||||
executor.submit(discordBot);
|
executor.submit(discordBot);
|
||||||
executor.submit(webAPI);
|
executor.submit(webAPI);
|
||||||
} catch (ExecutionException | InterruptedException e) {
|
} catch (ExecutionException | InterruptedException e) {
|
||||||
|
|
Loading…
Reference in a new issue