You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After making changes to Entity Framework models in api/Models/, run this command to generate and run a migration on the database. A timestamp will be used for the migration name.
npm test
This will run the xUnit tests in api.test/ and the Vue.js tests in client-web.test/.
npm run provision:prod
Before running this script, you need to create an ops/hosts file first. See the ops README for instructions.
This will run the ops/provision.yml Ansible playbook and provision hosts in ops/hosts inventory file. This prepares the hosts to recieve deployments by doing the following:
Install Nginx
Generate a SSL certificate from Let's Encrypt and configure Nginx to use it
Install .Net Core
Install Supervisor (will run/manage the ASP.NET app)
Install PostgreSQL
Setup a cron job to automatically backup the PostgresSQL database, compress it, and upload it to S3.
Setup UFW (firewall) to lock everything down except inbound SSH and web traffic
Create a deploy user, directory for deployments and configure Nginx to serve from this directory
npm run deploy:prod
Before running this script, you need to create a ops/hosts file first. See the ops README for instructions.
This script will:
Build release Webpack bundles
Package the .NET Core application in Release mode (dotnet publish)
Run the ops/deploy.yml Ansible playbook to deploy this app to hosts in /ops/hosts inventory file. This does the following:
Copies the build assets to the remote host(s)
Updates the appsettings.json file with PostgresSQL credentials specified in ops/hosts file and the app URL (needed for JWT tokens)
Restarts the app so that changes will be picked up
Development Email Delivery
This template includes a MailCatcher Docker image so that when email is sent during development (i.e. new user registration), it can be viewed
in the MailCacher web interface at https://localhost:1080/.
Visual Studio Code config
This project has Visual Studio Code tasks and debugger launch config located in .vscode/.
Tasks
Command+Shift+B - Runs the "build" task which builds the api/ project
Command+Shift+T - Runs the "test" task which runs the xUnit tests in api.test/ and Mocha/Enzyme tests in client-web.test/.
Debug Launcher
With the following debugger launch configs, you can set breakpoints in api/ or the the Mocha tests in client-web.test/ and have full debugging support.
Debug api/ (server) - Runs the vscode debugger (breakpoints) on the api/ .NET Core app
Debug client-web.test/ (Mocha tests) - Runs the vscode debugger on the client-web.test/ Mocha tests
Credit
The following resources were helpful in setting up this template: