Engine initial commit

This commit is contained in:
Claude Brisson
2023-05-11 16:05:33 +02:00
parent 5321f452fd
commit a42d591d03
39 changed files with 1847 additions and 0 deletions

3
docker/clear.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker-compose rm -fsv

37
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,37 @@
version: '3'
services:
pairgoth:
container_name: pairgoth-engine
image: maven:3.6.3-openjdk-11-slim
working_dir: /home/app/pairgoth
user: "${APP_UID}:${APP_GID}"
entrypoint: bash -c
command: '"mvn -e -Duser.home=/home/app clean package jetty:run"'
# command: mvn -X -e -Pdev clean verify -Dit.test=ApiTokenIT#test01NoVersionHeader -Dorg.slf4j.simpleLogger.log.level=trace jetty:run
volumes:
- ${HOME}/.m2:/home/app/.m2
- ./pairgoth.properties:/var/lib/pairgoth/pairgoth.properties
- ..:/home/app/pairgoth
- ./data/jetty:/var/lib/pairgoth/jetty
networks:
- pairgoth-network
ports:
- '5006:5006'
- '8080:8080'
environment:
HOME: "/home/app"
USER: "app"
MAVEN_CONFIG: "/home/app/.m2"
MAVEN_OPTS: "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5006"
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
SMTP_PASSWORD: ${SMTP_PASSWORD}
# restart: unless-stopped
stdin_open: true
tty: true
networks:
pairgoth-network:
driver: bridge

8
docker/run.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
grep -r '^smtp\.host' webapp.properties | sed -r -e 's/smtp\.host/SMTP_HOST/' -e 's/ //g' > .env
grep -r '^smtp\.port' webapp.properties | sed -r -e 's/smtp\.port/SMTP_PORT/' -e 's/ //g' >> .env
grep -r '^smtp\.user' webapp.properties | sed -r -e 's/smtp\.user/SMTP_USER/' -e 's/ //g' >> .env
grep -r '^smtp\.password' webapp.properties | sed -r -e 's/smtp\.password/SMTP_PASSWORD/' -e 's/ //g' >> .env
APP_UID=$(id -u) APP_GID=$(id -g) docker-compose up