mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-04 08:42:45 +00:00
[AB-xxx] refactoring rest-api to not be a maven project and restructuring python tool file structure
This commit is contained in:
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -50,7 +50,6 @@ jobs:
|
||||
path: ./deployment/installer/.env
|
||||
- name: Push container
|
||||
run: docker-compose build && docker-compose push
|
||||
working-directory: ./deployment/installer/
|
||||
env:
|
||||
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
|
||||
VERSION: ${{ steps.dotenv.outputs.version }}
|
||||
@@ -19,7 +19,6 @@
|
||||
<module>scheduling</module>
|
||||
<module>documentation</module>
|
||||
<module>bundle</module>
|
||||
<module>rest-api</module>
|
||||
</modules>
|
||||
|
||||
<distributionManagement>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>dev.sheldan.abstracto</groupId>
|
||||
<artifactId>abstracto-application</artifactId>
|
||||
<version>1.5.15-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>dev.sheldan.sissi.api</groupId>
|
||||
<artifactId>rest-api</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>rest-api-${project.version}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,19 +0,0 @@
|
||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>zip</id>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<outputDirectory>resources</outputDirectory>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<outputDirectory>.</outputDirectory>
|
||||
<directory>${project.basedir}/src/main/python</directory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@@ -1,9 +0,0 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
config_deployment:
|
||||
build: config-deployment
|
||||
image: ${REGISTRY_PREFIX}abstracto-db-deployment:${VERSION:-latest}
|
||||
template_deployment:
|
||||
build: template-deployment
|
||||
image: ${REGISTRY_PREFIX}abstracto-template-deployment:${VERSION:-latest}
|
||||
14
docker-compose.yaml
Normal file
14
docker-compose.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
config_deployment:
|
||||
build: python/deployment/installer/config-deployment
|
||||
image: ${REGISTRY_PREFIX}abstracto-db-deployment:${VERSION:-latest}
|
||||
template_deployment:
|
||||
build: python/deployment/installer/template-deployment
|
||||
image: ${REGISTRY_PREFIX}abstracto-template-deployment:${VERSION:-latest}
|
||||
rest_api:
|
||||
build:
|
||||
context: python/components/rest-api
|
||||
dockerfile: docker/Dockerfile
|
||||
image: ${REGISTRY_PREFIX}abstracto-rest-api:${VERSION:-latest}
|
||||
10
python/components/rest-api/docker/Dockerfile
Normal file
10
python/components/rest-api/docker/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM python:3.10.13-alpine3.18
|
||||
RUN apk --no-cache add msttcorefonts-installer fontconfig && \
|
||||
update-ms-fonts && \
|
||||
fc-cache -f
|
||||
ADD wrapper /
|
||||
ADD python/requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
ADD resources /python/resources
|
||||
ADD python /python
|
||||
CMD ["/run.sh"]
|
||||
17
python/components/rest-api/python/requirements.txt
Normal file
17
python/components/rest-api/python/requirements.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
blinker==1.7.0
|
||||
certifi==2023.7.22
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.7
|
||||
Flask==3.0.0
|
||||
idna==3.4
|
||||
importlib-metadata==6.8.0
|
||||
itsdangerous==2.1.2
|
||||
Jinja2==3.1.2
|
||||
MarkupSafe==2.1.3
|
||||
Pillow==10.1.0
|
||||
requests==2.31.0
|
||||
urllib3==2.0.7
|
||||
waitress==2.1.2
|
||||
Werkzeug==3.0.1
|
||||
zipp==3.17.0
|
||||
pytz==2023.3.post1
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
5
python/components/rest-api/wrapper/run.sh
Executable file
5
python/components/rest-api/wrapper/run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Starting python server..."
|
||||
cd python
|
||||
python3 -u main.py
|
||||
Reference in New Issue
Block a user