diff --git a/.gitignore b/.gitignore index 549e00a..7056e52 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ build/ ### VS Code ### .vscode/ +.devspace diff --git a/devcontainer.sh b/devcontainer.sh new file mode 100755 index 0000000..a90107f --- /dev/null +++ b/devcontainer.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set +e + +# Compile the project for the first time +mvn -T 1C clean install -Dmaven.test.skip -DskipTests -Dmaven.javadoc.skip=true + +COLOR_BLUE="\033[0;94m" +COLOR_GREEN="\033[0;92m" +COLOR_RESET="\033[0m" + +echo -e "${COLOR_BLUE} +Welcome to your development container!${COLOR_RESET} + +This is how you can work with it: +- Files will be synchronized between your local machine and this container +- You can run any commands that you run generally to manage the application. +" + +# Set terminal prompt +export PS1="\[${COLOR_BLUE}\]devspace\[${COLOR_RESET}\] ./\W \[${COLOR_BLUE}\]\\$\[${COLOR_RESET}\] " +if [ -z "$BASH" ]; then export PS1="$ "; fi + +# Include project's bin/ folder in PATH +export PATH="./bin:$PATH" + +# Open shell +bash --norc diff --git a/devspace.yaml b/devspace.yaml new file mode 100644 index 0000000..fb76327 --- /dev/null +++ b/devspace.yaml @@ -0,0 +1,24 @@ +version: v2beta1 +name: search + +pipelines: + dev: + run: |- + ensure_pull_secrets --all + start_dev app + +dev: + app: + imageSelector: ghcr.io/polyflix/search:main + devImage: ghcr.io/loft-sh/devspace-containers/java-maven:3-openjdk-17-slim + sync: + - path: ./ + excludePaths: + - .git/ + uploadExcludePaths: + - Dockerfile + - target/ + terminal: + command: ./devcontainer.sh + ports: + - port: "5007:8080" diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 15aa3c1..bca5e74 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -9,7 +9,7 @@ ${CONSOLE_LOG_PATTERN} - + @@ -17,7 +17,7 @@ - +