-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3627abb
commit 4477c2a
Showing
8 changed files
with
83 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: '3.8' | ||
|
||
services: | ||
database: | ||
image: chucknorrisio/postgres | ||
container_name: chucknorris-database | ||
healthcheck: | ||
interval: 30s | ||
retries: 5 | ||
start_period: 80s | ||
test: [ "CMD-SHELL", "pg_isready", "-d", "db_prod" ] | ||
timeout: 60s | ||
ports: | ||
- '5432:5432' | ||
|
||
service: | ||
environment: | ||
- APPLICATION_EVENT_SNS_TOPIC_ARN=my-application-event-sns-topic-arn | ||
- AWS_ACCESS_KEY_ID=my-aws-access-key-id | ||
- AWS_ACCESS_KEY_SECRET=my-aws-access-key-secret | ||
- AWS_REGION=my-aws-region | ||
- DAILYCHUCK_BUCKET_NAME=my-dailychuck-bucket-name | ||
- DAILYCHUCK_KEY_NAME=my-dailychuck-key-name | ||
- DATABASE_URL=postgres://postgres:postgres@database:5432/chuck | ||
- MAILCHIMP_API_KEY=my-mailchimp-api-key | ||
- MAILCHIMP_DAILYCHUCK_LIST_ID=my-mailchimp-dailychuck-list-id | ||
- SLACK_CONTENT_WHITELISTED_CATEGORIES=career,dev,fashion,food,money,movie,travel | ||
- SLACK_OAUTH_ACCESS_TOKEN=xxxx-xxxxxxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
- SLACK_OAUTH_CLIENT_ID=xxxxxxxxxxx.xxxxxxxxxxxx | ||
- SLACK_OAUTH_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
- SLACK_OAUTH_REDIRECT_URI=https://api.chucknorris.io/connect/slack | ||
image: chucknorris/chucknorris-web | ||
container_name: chucknorris-web | ||
depends_on: | ||
database: | ||
condition: service_healthy | ||
ports: | ||
- '8080:8080' |
16 changes: 16 additions & 0 deletions
16
chucknorris-integration-test/script/run-integration-test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
readonly SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) | ||
readonly MODULE_DIR=$(cd "${SCRIPT_DIR}/.." && pwd) | ||
readonly PROJECT_DIR=$(cd "${SCRIPT_DIR}/../.." && pwd) | ||
|
||
./gradlew --build-file "$PROJECT_DIR/build.gradle" clean dockerTagCurrent | ||
|
||
# docker-compose --file "$MODULE_DIR/docker-compose.yml" up \ | ||
# --exit-code-from "integration-test" \ | ||
# --quiet-pull \ | ||
# --remove-orphans | ||
|
||
docker-compose --file "$MODULE_DIR/docker-compose.yml" up \ | ||
--quiet-pull \ | ||
--remove-orphans |
28 changes: 0 additions & 28 deletions
28
...-web/src/main/java/io/chucknorris/api/configuration/CrossOriginResourceSharingConfig.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
chucknorris-web/src/main/java/io/chucknorris/api/configuration/WebConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.chucknorris.api.configuration; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class WebConfig { | ||
|
||
@Bean | ||
public WebMvcConfigurer corsConfigurer() { | ||
return new WebMvcConfigurer() { | ||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry | ||
.addMapping("/**") | ||
.allowedHeaders("*") | ||
.allowedMethods("*") | ||
.allowedOrigins("*") | ||
.exposedHeaders("Access-Control-Allow-Origin Access-Control-Allow-Credentials"); | ||
} | ||
}; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.gradle.logging.level=quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ | |
|
||
rootProject.name = 'chucknorris' | ||
|
||
include("chucknorris-integration-test") | ||
include("chucknorris-web") |