Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanpaulovich committed Sep 13, 2020
1 parent ae444cc commit 81b6659
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions .docker/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- ASPNETCORE_HTTPS_PORT=443
- ASPNETCORE_Kestrel__Certificates__Default__Password=MyCertificatePassword
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
- PersistenceModule__DefaultConnection=Server=sql1;User Id=sa;Password=<YourStrong!Passw0rd>;Database=Accounts;
volumes:
- ~/.aspnet/https:/https:ro
identity-server:
Expand Down
6 changes: 3 additions & 3 deletions .docker/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ echo "4. Building Docker images in silent mode. This may take few minutes..."
echo -e "\n\n\tYou many need to manually startup Docker before running this script.\n\n"
docker-compose build --quiet
echo "5. Starting up SQL Server in Docker..."
#docker-compose up -d sql1
docker-compose up -d sql1
echo "6. Installing Entity Framework Tool to migrate databases."
#dotnet tool update --global dotnet-ef --version 3.1.7
dotnet tool update --global dotnet-ef --version 3.1.7
echo "7. Generating accounts schema in DB..."
#dotnet ef database update --project ../accounts-api/src/Infrastructure --startup-project ../accounts-api/src/WebApi
dotnet ef database update --project ../accounts-api/src/Infrastructure --startup-project ../accounts-api/src/WebApi
echo "8. Starting up Identity Server and Accounts applications."
docker-compose up -d
echo -e "9. Browse to $(tput setaf 3)https://wallet.local/$(tput sgr0)\n\nUse the following credentials to login into Identity Server:\n\n\tUsername:\t$(tput setaf 3)alice$(tput sgr0)\n\tPassword:\t$(tput setaf 3)alice$(tput sgr0)"
6 changes: 3 additions & 3 deletions accounts-api/src/WebApi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ RUN dotnet publish "WebApi.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
#RUN cp /https/cert.crt /usr/local/share/ca-certificates/cert.crt
#RUN chmod 644 /usr/local/share/ca-certificates/cert.crt && update-ca-certificates
ENTRYPOINT ["dotnet", "WebApi.dll"]
COPY /src/WebApi/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
CMD ["entrypoint.sh"]
4 changes: 4 additions & 0 deletions accounts-api/src/WebApi/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
cp /https/localhost.crt /usr/local/share/ca-certificates/localhost.crt
update-ca-certificates
dotnet WebApi.dll
11 changes: 5 additions & 6 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ http {

server {
listen 443 ssl;
# server_name wallet.local;

ssl_certificate /etc/ssl/certs/localhost.crt;
ssl_certificate_key /etc/ssl/private/localhost.key;
Expand All @@ -34,13 +33,13 @@ http {

location /identity-server {
rewrite /identity-server/?(.*) /$1 break;
proxy_pass http://identity-server;
proxy_pass https://identity-server;
}

# location /accounts-api {
# rewrite /accounts-api/?(.*) /$1 break;
# proxy_pass http://accounts-api;
# }
location /accounts-api {
rewrite /accounts-api/?(.*) /$1 break;
proxy_pass https://accounts-api;
}

location / {
proxy_pass http://wallet-spa:3000;
Expand Down

0 comments on commit 81b6659

Please sign in to comment.