Skip to content
Snippets Groups Projects
Commit de3a9397 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Start on docker image

parent 6898d240
No related branches found
No related tags found
No related merge requests found
.env 0 → 100644
API_ROOT=ewngu43gbipbowboi
WORKING_DIR=/Users/tobias/Documents/Programmieren/Projects/PlayWall/PlayWallServer
\ No newline at end of file
......@@ -3,3 +3,6 @@
/settings.properties
/target
/deploy
/build/
/deploy_docker/
/storage/
FROM openjdk:8
USER root
COPY build/1.0-SNAPSHOT/playwall-server.jar /root/playwall-server.jar
WORKDIR /root
CMD ["java", "-jar", "playwall-server.jar"]
version: '3.3'
services:
mysql:
image: mysql:8
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${API_ROOT}
MYSQL_DATABASE: api
MYSQL_ROOT_HOST: '%'
volumes:
- "${WORKING_DIR}/storage/mysql:/var/lib/mysql"
networks:
- netMySQL
ports:
- "3306:3306"
playwall:
image: jtobisan/playwall-server:latest
restart: always
volumes:
- "${WORKING_DIR}/deploy_docker:/root/deploy"
expose:
- "8090"
ports:
- "8080:8080"
networks:
- netMySQL
depends_on:
- mysql
networks:
netMySQL:
driver: bridge
......@@ -9,8 +9,14 @@
<version>1.0-SNAPSHOT</version>
<properties>
<java-version>1.8</java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.main>de.tobias.playpad.server.PlayPadServer</project.main>
<java.version>1.8</java.version>
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<scala-maven-plugin.version>3.4.4</scala-maven-plugin.version>
<maven-jar-plugin.version>2.3.1</maven-jar-plugin.version>
<scala-library.version>[2.13.0,)</scala-library.version>
......@@ -86,22 +92,50 @@
</dependencies>
<build>
<!-- <finalName>PlayWallServer</finalName>-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<outputDirectory>build/${project.version}</outputDirectory>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>de.tobias.playpad.server.PlayPadServer</mainClass>
<mainClass>${project.main}</mainClass>
</manifest>
</archive>
<descriptorRefs>
......@@ -118,22 +152,22 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>release</id>
<name>TheCodeLabs-releases</name>
<url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-release</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>TheCodeLabs-snapshots</name>
<url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-snapshots</url>
</snapshotRepository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<id>scala</id>
......@@ -146,8 +180,29 @@
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>release</id>
<url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-plugins-release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-plugins-snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>scala</id>
......@@ -163,7 +218,7 @@
<repository>
<id>release</id>
<url>https://maven.thecodelabs.de/artifactory/TheCodeLabs-release</url>
<url>https://maven.thecodelabs.de/artifactory/Releases</url>
<releases>
<enabled>true</enabled>
</releases>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment