Skip to content

Add Docker code 🐳 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9f8f9be
Add Docker code :whale:
Oct 31, 2016
492bc29
Delete .Dockerfile.swp
fernandochimi Oct 31, 2016
eddab53
Delete .README.md.swp
fernandochimi Oct 31, 2016
54414d4
update gitignore
Oct 31, 2016
2a629b1
Delete alert.component.js
fernandochimi Oct 31, 2016
cb272cc
Delete alert.component.js.map
fernandochimi Oct 31, 2016
96c809b
Delete index.js
fernandochimi Oct 31, 2016
56cd0eb
Delete index.js.map
fernandochimi Oct 31, 2016
8a23a04
Delete auth.guard.js
fernandochimi Oct 31, 2016
c91edc7
Delete auth.guard.js.map
fernandochimi Oct 31, 2016
5f9c363
Delete index.js.map
fernandochimi Oct 31, 2016
4a6b804
Delete index.js
fernandochimi Oct 31, 2016
534ec46
Delete fake-backend.js
fernandochimi Oct 31, 2016
94ad1a8
Delete fake-backend.js.map
fernandochimi Oct 31, 2016
76c544b
Delete index.js
fernandochimi Oct 31, 2016
7f8c646
Delete index.js.map
fernandochimi Oct 31, 2016
f93d236
Delete index.js
fernandochimi Oct 31, 2016
df4710d
Delete index.js.map
fernandochimi Oct 31, 2016
b3e7a12
Delete user.js
fernandochimi Oct 31, 2016
23af560
Delete user.js.map
fernandochimi Oct 31, 2016
6dc21cd
Delete alert.service.js
fernandochimi Oct 31, 2016
8ef1c0b
Delete alert.service.js.map
fernandochimi Oct 31, 2016
487679e
Delete authentication.service.js
fernandochimi Oct 31, 2016
899735b
Delete authentication.service.js.map
fernandochimi Oct 31, 2016
bef8adc
Delete index.js
fernandochimi Oct 31, 2016
d48b50d
Delete user.service.js
fernandochimi Oct 31, 2016
6138054
Delete user.service.js.map
fernandochimi Oct 31, 2016
706ab12
Delete index.js.map
fernandochimi Oct 31, 2016
092317b
Delete home.component.js
fernandochimi Oct 31, 2016
f81d15e
Delete home.component.js.map
fernandochimi Oct 31, 2016
de80196
Delete index.js
fernandochimi Oct 31, 2016
d2cda5d
Delete index.js.map
fernandochimi Oct 31, 2016
8c49594
Delete index.js
fernandochimi Oct 31, 2016
6fae7c5
Delete index.js.map
fernandochimi Oct 31, 2016
683131c
Delete login.component.js
fernandochimi Oct 31, 2016
bcb6a13
Delete login.component.js.map
fernandochimi Oct 31, 2016
769370e
Delete index.js
fernandochimi Oct 31, 2016
292cb48
Delete index.js.map
fernandochimi Oct 31, 2016
4580e15
Delete register.component.js
fernandochimi Oct 31, 2016
8983f92
Delete register.component.js.map
fernandochimi Oct 31, 2016
5791ac2
Delete app.component.js
fernandochimi Oct 31, 2016
8924b5f
Delete app.component.js.map
fernandochimi Oct 31, 2016
3440dcd
Delete app.module.js
fernandochimi Oct 31, 2016
b6bcbdf
Delete app.module.js.map
fernandochimi Oct 31, 2016
b35839b
Delete app.routing.js
fernandochimi Oct 31, 2016
03a7334
Delete app.routing.js.map
fernandochimi Oct 31, 2016
a8e3a47
Delete main.js
fernandochimi Oct 31, 2016
9533d5f
Delete main.js.map
fernandochimi Oct 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ typings
# Optional REPL history
.node_repl_history

# Generated files
app/**/*.js
app/**/*.js.map
# Output of 'npm pack'
*.tgz

system-config.js*
*.swp
angular_registration/**/*.js
angular_registration/**/*.map
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:6.9.0

RUN mkdir /angular2-registration-login-example
ADD angular_registration /angular2-registration-login-example/angular_registration/
WORKDIR /angular2-registration-login-example/angular_registration/
RUN npm install

23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PROJECT_ID := angular2-registration-login-example
DCMP = docker-compose
SYSTEMJS = systemjs.config.js

build:
${DCMP} build

start:
${DCMP} up -d

stop:
${DCMP} stop

clean:
find . -name "*.map" -exec rm -rf {} \;
rm -rf *.log

execute:
sudo chown -R ${USER}:${USER} .
${MAKE} clean
${MAKE} build
${MAKE} start

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
Angular 2 User Registration and Login Example & Tutorial

To see a demo and further details go to http://jasonwatmore.com/post/2016/09/29/angular-2-user-registration-and-login-example-tutorial

## How to execute
1. First install [Git](https://git-scm.com/downloads), [Docker](https://docs.docker.com/engine/installation/) and [Docker compose](https://docs.docker.com/compose/install/)
2. Clone this repo to your machine
3. Type `make execute` in your favorite terminal
4. Voilà :rocket:

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export class AuthenticationService {
// remove user from local storage to log user out
localStorage.removeItem('currentUser');
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json → angular_registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "angular2-registration-login-example",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '2'
services:
web:
restart: always
build: .
command: bash -c "cd /angular2-registration-login-example/angular_registration/ && npm start"
volumes:
- .:/angular2-registration-login-example
- /angular2-registration-login-example/angular_registration/node_modules
ports:
- "3000:3000"