Skip to content

Commit

Permalink
Небольшой рефакторинг (#4).
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Kuznetsov committed Jul 5, 2024
1 parent 383de11 commit 009a776
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 61 deletions.
9 changes: 9 additions & 0 deletions .idea/runConfigurations/ProtegoTotalumBotApp.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .idea/runConfigurations/assemble.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/runConfigurations/ktlintCheck.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions .run/assemble.run.xml

This file was deleted.

2 changes: 1 addition & 1 deletion docker/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COMPOSE_PROJECT_NAME = leo-bot
COMPOSE_PROJECT_NAME = protego-totalum-bot
26 changes: 12 additions & 14 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
version: "3.9"

networks:
leo-network:
name: $APPLICATION_NAME-network
external: false

services:
database:
container_name: $APPLICATION_NAME-postgres
Expand All @@ -18,8 +11,8 @@ services:
POSTGRES_USER: $PG_USER
POSTGRES_PASSWORD: $PG_PASSWORD
networks:
- leo-network
leo-bot:
- protego-totalum-network
protego-totalum-bot:
container_name: $APPLICATION_NAME-bot
depends_on:
- database
Expand All @@ -29,11 +22,16 @@ services:
ports:
- "8080:8080"
command:
- discord-leo-bot.jar
- protego-totalum-bot.jar
environment:
LEO_DB_HOST: database
LEO_DB_PORT: 5432
PROTEGO_TOTALUM_DB_HOST: database
PROTEGO_TOTALUM_DB_PORT: 5432
networks:
- leo-network
- protego-totalum-network
env_file:
- ignore.env
- ignore.env

networks:
protego-totalum-network:
name: $APPLICATION_NAME-network
external: false
8 changes: 4 additions & 4 deletions docker/env.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set APPLICATION_NAME=leo
set APPLICATION_NAME=protego-totalum

set PG_DBNAME=leo_db
set PG_USER=leo_login
set PG_PASSWORD=leo_password
set PG_DBNAME=protego_totalum
set PG_USER=protego_totalum
set PG_PASSWORD=protego_totalum
set PG_PORT=5123
5 changes: 3 additions & 2 deletions docker/postgres/create_schemas.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
\connect leo_db
create schema if not exists leo_bot_schema;
\connect protego_totalum
create schema if not exists protego_totalum;
create schema if not exists liquibase;
9 changes: 5 additions & 4 deletions pt-discord/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM eclipse-temurin:21-jdk-alpine
MAINTAINER Vladislav Kuznetsov <[email protected]>
FROM openjdk:21
USER 65534
LABEL org.opencontainers.image.authors="Vladislav Kuznetsov <[email protected]>"
VOLUME /tmp
ADD build/libs/pt-discord-2024.1.jar protego-totalum-bot.jar
ADD build/libs/pt-discord-0.0.1-SNAPSHOT.jar protego-totalum-bot.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "discord-leo-bot.jar"]
ENTRYPOINT ["java", "-jar", "protego-totalum-bot.jar"]

0 comments on commit 009a776

Please sign in to comment.