diff --git a/server/application-server/.env.example b/server/application-server/.env.example index b3196b8..e235638 100644 --- a/server/application-server/.env.example +++ b/server/application-server/.env.example @@ -2,5 +2,6 @@ DATASOURCE_URL=jdbc:postgresql://127.0.0.1/helios DATASOURCE_USERNAME=helios DATASOURCE_PASSWORD=helios NATS_SERVER=localhost:4222 -REPOSITORY_NAME=# e.g. ls1intum/Helios -NATS_AUTH_TOKEN= +NATS_AUTH_TOKEN='5760e8ae09adfb2756f9f8cd5cb2caa704cd3f549eaa9298be843ceb165185d815b81f90c680fa7f626b7cd63abf6ac9' +REPOSITORY_NAME= + diff --git a/server/webhook-listener/.env.example b/server/webhook-listener/.env.example new file mode 100644 index 0000000..667db49 --- /dev/null +++ b/server/webhook-listener/.env.example @@ -0,0 +1,2 @@ +NATS_AUTH_TOKEN='5760e8ae09adfb2756f9f8cd5cb2caa704cd3f549eaa9298be843ceb165185d815b81f90c680fa7f626b7cd63abf6ac9' +WEBHOOK_SECRET= diff --git a/server/webhook-listener/README.md b/server/webhook-listener/README.md index cf805a5..e67573a 100644 --- a/server/webhook-listener/README.md +++ b/server/webhook-listener/README.md @@ -31,12 +31,20 @@ Add Webhook in GitHub repository and set the secret: export WEBHOOK_SECRET= ``` +## Setup configuration and environment + +Copy the file `.env.example` to `.env` and adjust the values to your needs. It is set up to work with the Docker Compose setup for database. You need to adjust some fields for NATS server. + +```bash +cp .env.example .env +``` + ## Running with Docker Compose Build and run with Docker Compose: ```bash -docker-compose up --build +docker-compose --env-file ./.env up --build ``` Service ports: diff --git a/server/webhook-listener/compose.yaml b/server/webhook-listener/compose.yaml index ae87a0a..b1aa291 100644 --- a/server/webhook-listener/compose.yaml +++ b/server/webhook-listener/compose.yaml @@ -14,7 +14,7 @@ services: - common-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:4200/health"] - interval: 5s + interval: 30s timeout: 10s retries: 5 start_period: 3s