Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ build/

### VS Code ###
.vscode/
.devspace
27 changes: 27 additions & 0 deletions devcontainer.sh
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions devspace.yaml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
</layout>
</appender>
<springProfile name="!(default | local)">
<springProfile name="!(default | local | dev)">
<logger name="jsonLogger" additivity="false" level="DEBUG">
<appender-ref ref="consoleAppender"/>
</logger>
<root level="INFO">
<appender-ref ref="consoleAppender"/>
</root>
</springProfile>
<springProfile name="default | local">
<springProfile name="default | local | dev">
<root level="INFO">
<appender-ref ref="defaultAppender"/>
</root>
Expand Down