Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yokawasa/angular4-quickstart
Angular 4 Apps Quickstart Configuration that deploys an app using angular-cli and Docker Container
https://github.com/yokawasa/angular4-quickstart
angular angular4 docker docker-compose dockerfile nodejs
Last synced: 11 days ago
JSON representation
Angular 4 Apps Quickstart Configuration that deploys an app using angular-cli and Docker Container
- Host: GitHub
- URL: https://github.com/yokawasa/angular4-quickstart
- Owner: yokawasa
- Created: 2017-07-18T15:20:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T17:00:47.000Z (over 7 years ago)
- Last Synced: 2024-10-30T03:50:25.300Z (about 2 months ago)
- Topics: angular, angular4, docker, docker-compose, dockerfile, nodejs
- Language: Shell
- Homepage:
- Size: 1.2 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular4-quickstart
Angular 4 Apps Quickstart Configuration that deploys an app using [angular-cli](https://github.com/angular/angular-cli) and [Docker Container](https://www.docker.com/what-container) (Great thanks to [angular-cli-docker](https://github.com/suchja/angular-cli-docker) which is a reference project for this)
## Prerequisites
You need Docker to run docker containers. You can download docker (Free Community Edition) for Mac, Windows or Linux from [here](https://www.docker.com/community-edition)## Building and Running an Angular 4 app
What you need to do is simply to run build.sh. That's it!
```
$ cat build.sh#!/bin/sh
APP_NAME=myapp
docker pull teracy/angular-cli
docker run -it --rm --name create-angular-project -v "$PWD":/home/nodejs -w /home/nodejs teracy/angular-cli ng new $APP_NAME
docker-compose builddocker-compose up
$ ./build.sh
```What the build.sh basically does are:
- Pull an angular-cli image from a registry, [teracy/angular-cli](https://hub.docker.com/r/teracy/angular-cli/)
- Run the angular-cli conatiner and Creates a new Angular 4 app named 'myapp'
- Build a container that can serve the app
- Launches the server in the containerIf the build.sh launches the server in the container and the app gets ready, you will see messages like this:
![console-screen-build](https://github.com/yokawasa/angular4-quickstart/blob/master/img/console-screen-build.png)Then, open your browser on http://localhost:4200/
![app-welcome-page](https://github.com/yokawasa/angular4-quickstart/blob/master/img/app-welcome-page.png)