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
70 changes: 70 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Ignore .git directory
.git

# Ignore any .env files
.env
application*.yml
application.yml

# Ignore build directories
build/
target/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

# Ignore Gradle cache
.gradle/

# Ignore logs and temporary files
*.log
*.tmp
*.swp

# Ignore IDE specific files
.vscode/
.idea/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

# Ignore OS generated files
.DS_Store
Thumbs.db

# Ignore the Git hooks directory
.git/hooks/

# Ignore Docker-related files
docker-compose.yml
Dockerfile

# Ignore README and other documentation files
README.md
HELP.md

# Ignore setup script and pre-push hook
setup.sh
pre-push

# STS specific files
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

# NetBeans specific files
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ out/
### Environment Variable Files ###
application*.yml
application.yml
.env
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,9 @@ and see "Hello Swarm!"

Unit Tests:



OpenAI API Call Example:

*IMPORTANT*
Create an application.yml in the src/main/resources folder(the one with application.properties) AND another application.yml in test/resources. Then get an OpenAI api key from their website
and copy it into both of the application.yml files in this format:
OPENAI_API_KEY: <YOUR-GENERATED-KEY-GOES-HERE>
IMPORTANT Create an application.yml in the src/main/resources folder(the one with application.properties) AND another application.yml in test/resources. Then get an OpenAI api key from their website and copy it into both of the application.yml files in this format: OPENAI_API_KEY:

ABSOLUTELY DO NOT COPY THIS KEY INTO ANY OTHER FILE, OR COMMIT CODE WITH KEYS IN IT.

Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# version - Specifies the version of the Docker Compose file format.
# services - Defines the services to be created when docker-compose up is run.
# build - Tells Docker-Compose to build an image using the Dockerfile in the current directory.
# app - The name of the services to be created when docker-compose up is run.
# ports - Maps port 8080 of the host to port 8080 of the container.
version: '3.8'
services:
app:
build: .
ports:
- "8080:8080"

test:
build: .
ports:
- "8080:8080"
command: ./gradlew test
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
spring.application.name=swarm-rest-api
spring.profiles.active=local
spring.profiles.active=local