DAMN = Docker. Angular. MongoDB. and .NET.
DAMN Stack is an open source project, designed to get new projects up and going quickly, by providing a template and pattern to follow. It is created with Angular (for the UI), .NET Core (for the API), and MongoDB (...for the DB).
Use DAMN Stack with your next project.
- Clone the stack
- Rename the API solution and project
- If desired, change the folders and namespaces to match your naming schemas.
Project Source Repo:
Project Deployment Repo:
https://github.com/dahln/damn-deploy
Docker Hub Repo:
https://hub.docker.com/r/dahln/damn-deploy/
Contact/FAQ/Support:
DAMN Stack has taken several forms over that past few years. It was originally a project template on the Visual Studio Gallery (Under a different name using .NET, AngularJS, and SQL). That project eventually evolved into the Glubfish Stack. Damn Stack is the next iteration of this application stack. The transition to DAMN Stack adds a new tool that allows developers to specify a projet name and generate a new project based on the DAMN Stack but with the project name specified.
The demo for this stack can be found here: https://damnstack.org
Note: Because this site is for demonstration, the database could be wiped/recreated at any time.
This demo application is a simple Todo list, but it provides a solid starting point for more advanced applications. The basic requirements for the project are as follows:
- Angular Frontend App
- .NET Core API
- MongoDB
- Allow a user to register for an account
- Require a user to authenticate with a valid username and password to sign in
- Allow the user to manage a Todo list
- Allow the user to manage their profile
- Angular - have a clean startup process (include determining if the user is already signed in)
- Angular - maintain session across browser/tab closing
- Angular - Use Bootstrap JS (latest production release)
- Angular - Use Typescript
- Angular - Create a library of external services to consume. Inlude the library in any components that need to use a web service.
- .NET Core - expose functionality via an API
- .NET Core - enforce authorization for all web necessary services
- .NET Core - Use JWT tokens for security. Store the token in a cookie.
- .NET Core - Use dependecy injection
- .NET Core - Use MongoDB as the data store
- MongoDB - Store Data
There are three ways to run this application.
You can run the App and DB manually. Ensure your connection strings match. This method is good for development/debugging.
The second way you can run the application using the docker-compose in the root folder of the project. Run 'docker-compose build' to build, then 'docker-compose up' to run the application. This method is good to test the docker images.
The third way you can run this application is to pull the images from docker hub. No code - just run in the docker image. To do this, visit this repo stack-deploy at github. This repo contains a docker-compose file which points to the published images in the public repo for this project at docker hub. This method is great for production. On your production machine, 'git clone https://github.com/damnstack/stack-deploy.git'. After cloned, run 'docker-compose build' and then 'docker-compose up' (add the -d flag to run the application in the background)
The main "code" project has a file, dockerTagPushToHub.bat. This will push the latest project image to the connected repo. If you use this file, change the image version numbers in there and make them match the version numbers in the docker-compose in the glubfish-deploy project. After you pushing the latest images to docker hub repo, pull the latest docker-compose to your prodcution machine. If you updated the docker-compose to have the latest image version numbers, when should be able to deploye easily.
NOTE: The docker compose file specifies a storage volume for the mongodb database. That path is for a linux box. Change it for your particular configuration
NOTE: This image is setup with an SSL certificate, associated with the damnstack.org domain. You can run these images, but you will get a certificate warning. Visit the github for the project source, and modify the images to include your SSL cert.
December 2018
- CORS Fixes for .NET Core 2.2
- Separated the .NET Core and Angular applications into Client/Server applications.
- Updated dockerfiles to match new structure
- Moved to new github repo github.com/dahln/damn
- Moved to new docker repo hub.docker.com/r/dahln/damn-deploy
December 2018
- Updated do .NET Core 2.2
- Update to Angular 7.1.2
- Changed host domain from damnstack.com to damnstack.org
November 2018
- Major Changes
- Wrapped the angular application in a .NET Core wrapper.
- Angular and API no run as a single application. Api can be comsumed without the fronted.
- CORS support for API is removed, but can easily be added back in if necessary
- New Dockerfiles and docker-compose files for new application architecture
- Separated solution into multiple projects: App, Model, Logic, and Data
- Updated the latest .NET Core version
- Updated Angular version
- Switching docker image version away from timebased version number
September 2018
- Glubfish Stack rebranded as Damn Stack
- New damnstack.com site
- Update demo UI
- Updated to .NET Core 2.1.3
August 2018
- Updated Angular to 6.1.1
- Updated to .NET Core 2.1.2
July 2018
- Updated Angular to 6.0.7
- Updated to .NET Core 2.1.1
- Updated .NET Core Dockerfile to work with .NET Core 2.1.1
May 2018
- Updated Angular to 6.0.0
- Switched to Bootstrap CDN
- Switched to FontAwesome 5 and CDN
- Switched to BootBox CDN
- Added Dockerfile's and Docker Compose
- Moved project from Visual Studio Gallery to Github
February 2018
- General code clean up for the API
- Updated Angular to 5.2.4
- Updated to Bootstrap 4
- Added FontAwesome 4 (Bootstrap dropped Glyphicon support)
- Support for FontAwesome 5 will come when FontAwesome releases their Angular library
- Replaced ngx-modialog with BootBox.js
December 2017
- Initial development of new project
- Replaced old AngularJS project
- Replaced old .NET 4.6 project
- Switched to MongoDB from SQL