Docker/-compose
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
- `AmazonPurchaser`
|
||||
- `EbaySeller`
|
||||
- `EbayPurchaser`
|
||||
- Dockerfile and `docker-compose.yml`
|
||||
|
||||
## 0.2.0
|
||||
|
||||
|
||||
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
# Use the official maven/Java 17 image to create a build artifact.
|
||||
# https://hub.docker.com/_/maven
|
||||
FROM maven:3.9.1-eclipse-temurin-17 AS build
|
||||
|
||||
# Set the working directory in the image to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the pom.xml file into the current directory (/app) in the image
|
||||
COPY pom.xml .
|
||||
|
||||
# Download all required dependencies into one layer
|
||||
RUN mvn -B dependency:go-offline
|
||||
|
||||
# Copy the rest of the application source code
|
||||
COPY src /app/src
|
||||
|
||||
# Build the application
|
||||
RUN mvn -B package -DskipTests
|
||||
|
||||
# Use OpenJDK 17 for the runtime stage of the Dockerfile
|
||||
FROM openjdk:17-jdk-slim
|
||||
|
||||
# Copy the jar file from the build stage
|
||||
COPY --from=build /app/target/easydrop-0.3.0-SNAPSHOT.jar /easydrop.jar
|
||||
|
||||
# Execute the application when the docker container starts.
|
||||
ENTRYPOINT ["java", "-jar", "/easydrop.jar"]
|
||||
|
||||
33
README.md
33
README.md
@@ -1,6 +1,6 @@
|
||||
# EasyDrop
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://sonar.fbe-adswen.rwu.de/dashboard?id=de.rwu%3Aeasydrop)
|
||||

|
||||
@@ -13,30 +13,37 @@ Get rich quick™ with fully automated dropshipping!
|
||||
|
||||

|
||||
|
||||
## Installation ⚙
|
||||
## Installation/Usage ⚙
|
||||
|
||||
As the application is still in development, development software will be required along its regular execution environment.
|
||||
|
||||
- JDK 17
|
||||
- Maven
|
||||
- _[More/context](https://gitlab.fbe-adswen.rwu.de/team1/sandbox2/-/wikis/Projektdokumentation/Development#software)_
|
||||
|
||||
## Usage 🛠
|
||||
- Install Docker + Compose
|
||||
- Clone this repository
|
||||
|
||||
Set up the required configuration files, use the corresponding demo files for orientation.
|
||||
|
||||
- `config/config.properties` for API authorization
|
||||
- `products-config.json` to define product catalogues to use for dropshipping
|
||||
|
||||
Run the following command to execute the program:
|
||||
Create the container
|
||||
|
||||
```sh
|
||||
mvn compile exec:java -Dexec.mainClass="de.rwu.easydrop.Main"
|
||||
```bash
|
||||
docker-compose build
|
||||
```
|
||||
|
||||
Then run it!
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
To run it on a fixed schedule, install a cron job, e.g.
|
||||
|
||||
```bash
|
||||
*/30 * * * * cd /home/user/easydrop && docker-compose up -d
|
||||
```
|
||||
|
||||
## Roadmap 🏁
|
||||
|
||||
_Future ideas!_
|
||||
- Access transaction log
|
||||
|
||||
## Contributing 👷♂️👷♀️
|
||||
|
||||
|
||||
23
Script/Bump_Version.sh
Normal file
23
Script/Bump_Version.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Checking if correct number of arguments are provided
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Required CLI args missing: [old_version, new_version]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Assigning command line arguments to variables
|
||||
old_version="$1"
|
||||
new_version="$2"
|
||||
|
||||
old_version_alt=${old_version//-/–}
|
||||
new_version_alt=${new_version//-/–}
|
||||
|
||||
# Replacing old_version with new_version in README.md
|
||||
sed -i "s/version-$old_version_alt-orange/version-$new_version_alt-orange/g" README.md
|
||||
sed -i "s/<version>$old_version/<version>$new_version/g" pom.xml
|
||||
sed -i "s/easydrop-$old_version.jar/easydrop-$new_version.jar/g" Dockerfile
|
||||
sed -i "s/image: easydrop:$old_version/image: easydrop:$new_version/g" docker-compose.yml
|
||||
|
||||
echo "Version number updated successfully"
|
||||
|
||||
@@ -2,6 +2,5 @@ mvn clean verify sonar:sonar -Pcoverage \
|
||||
-Dsonar.projectKey=EasyDrop \
|
||||
-Dsonar.projectName='EasyDrop' \
|
||||
-Dsonar.host.url=http://localhost:9000 \
|
||||
-Dsonar.token=sqp_82d35689c620c15fd1064549375e17a2a5b0b931
|
||||
|
||||
start http://localhost:9000/dashboard?id=EasyDrop
|
||||
-Dsonar.token=sqp_82d35689c620c15fd1064549375e17a2a5b0b931 \
|
||||
&& start http://localhost:9000/dashboard?id=EasyDrop
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
easydrop:
|
||||
container_name: easydrop
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: easydrop:0.3.0-SNAPSHOT
|
||||
volumes:
|
||||
- ./config:/config
|
||||
21
pom.xml
21
pom.xml
@@ -86,6 +86,27 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>de.rwu.easydrop.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user