Skip to content

Create a fresh new Angular project with dockerized development environment

License

Notifications You must be signed in to change notification settings

brainstation-au/angular-docker-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-docker-starter

This is not an Angular project. It's a package of few scripts that creates a fresh new latest Angular project with @angular/cli and configure the project to start development in a Docker container.

The objective of this project is to automate the setup process of new Angular project.

How to use?

Following instructions are based on default values in the .env file.

PROJECT_NAME=brainstation
LOCAL_HOST=brainstation.test
ANGULAR_PORT=4200
KARMA_PORT=9876
BOOTSTRAP=TRUE
MATERIAL=FALSE
DOMAIN=brainstation.com.au

Add the host name in /etc/hosts that is set for LOCAL_HOST variable in .env file.

127.0.0.1	localhost brainstation.test

You can choose styleguides between Bootstrap and Material.

Clone the repository and get started.

$ git clone https://github.com/brainstation-au/angular-docker-starter
$ cd angular-docker-starter
$ ./brainstation.sh

At this point we should have got a new folder named brainstation in the parent directory. This is the folder that has your new Angular project.

How is the new project?

$ cd ../brainstation
$ docker-compose up -d
$ docker-compose logs -f

At this point you will be watching logs. You can see npm installs all the project dependencies and then Angular CLI compiles the project. You can now browse your fresh project at http://brainstation.test:4200/.

You can run tests.

$ docker-compose exec client npm run test

You can see Angular CLI compiles the test modules and spec files. You can connect your browser at http://localhost:9876/.

Plugins

Bootstrap

If you have chosen bootstrap, you may want to add jQuery and popper CDN in your index.html. Please copy the snippet from getbootstrap.com and paste in your index.html.

Material

If you have chosen Material, you may want to add hammerjs for animations. Please add import 'hammerjs' in your main.ts file.

About

Create a fresh new Angular project with dockerized development environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published