Skip to content

Commit

Permalink
#116 Community - Deployment setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kgniazdowski committed Nov 15, 2021
1 parent 4740e0e commit 9685d59
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion community-service/src/Community.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void ConfigureServices(IServiceCollection services)

var applicationAssembly = typeof(CreateMemberCommand).Assembly;

if (!webHostEnvironment.IsDevelopment())
if (!webHostEnvironment.IsDevelopment() && Configuration["Deployment"] == "Heroku")
Configuration["EventStore:ConnectionString"] = GetHerokuConnectionString();

services
Expand Down
3 changes: 2 additions & 1 deletion community-service/src/Community.Api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"ClientId": "",
"ClientSecret": "",
"DatabaseConnection": ""
}
},
"Deployment": "None"
}
7 changes: 2 additions & 5 deletions docker-compose.client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,8 @@ services:
dockerfile: community-service/Dockerfile
ports:
- "84:80"
environment:
- EventStore:ConnectionString=Host=db;Database=community;Username=postgres;Password=pg
- RabbitMQ:Hostname=rabbit
- RabbitMQ:Username=admin
- RabbitMQ:Password=admin
env_file:
- ./community.env

employee-web-client:
image: employee-web-client
Expand Down
7 changes: 2 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,8 @@ services:
dockerfile: community-service/Dockerfile
ports:
- "84:80"
environment:
- EventStore:ConnectionString=Host=db;Database=community;Username=postgres;Password=pg
- RabbitMQ:Hostname=rabbit
- RabbitMQ:Username=admin
- RabbitMQ:Password=admin
env_file:
- ./community.env

volumes:
pgdata:

0 comments on commit 9685d59

Please sign in to comment.