diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c7c340 --- /dev/null +++ b/.dockerignore @@ -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/ diff --git a/.gitignore b/.gitignore index 30c9032..769a886 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ out/ ### Environment Variable Files ### application*.yml application.yml +.env diff --git a/README.md b/README.md index 37e440b..bb22fc7 100644 --- a/README.md +++ b/README.md @@ -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: +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. diff --git a/docker-compose.yml b/docker-compose.yml index 2ecf479..95d89c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b58820f..c7133cf 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,2 +1,2 @@ spring.application.name=swarm-rest-api -spring.profiles.active=local \ No newline at end of file +spring.profiles.active=local