Skip to content

Instantly share code, notes, and snippets.

docker build -t orlando1409/to-do-app .
#==================== Building Stage ================================================
# Create the image based on the official Node 8.9.0 image from Dockerhub
FROM node:8.9.0 as node
# Create a directory where our app will be placed. This might not be necessary
RUN mkdir -p /to-do-app
# Change directory so that our commands run inside this new directory
WORKDIR /to-do-app
mkdir vue-docker
cd vue-docker
git clone https://github.com/orlando-c-h/vue-to-do-app
cd to-do-app
yarn install
ng build
code .
mkdir react-docker
cd react-docker
git clone https://github.com/orlando-c-h/react-to-do-app
cd react-to-do-app
yarn install
yarn build
code .
mkdir ng-docker
cd ng-docker
git clone https://github.com/orlando-c-h/to-do-app
cd to-do-app
yarn install
ng build
code .
@orlando-c-h
orlando-c-h / nginx-to-do-app.conf
Created December 4, 2017 19:20
Nginx custom configuration file
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
@orlando-c-h
orlando-c-h / .dockerignore
Last active December 5, 2017 15:09
This file will potentially avoid adding unecessary files to a Docker image
#excluding the node_modules directory and the .git directory
node_modules/
.git/
@orlando-c-h
orlando-c-h / angular-dockerfile
Last active June 19, 2018 21:02
Dockerfile to build Node.js based image
#==================== Building Stage ================================================
# Create the image based on the official Node 8.9.0 image from Dockerhub
FROM node:8.9.0 as node
# Create a directory where our app will be placed. This might not be necessary
RUN mkdir -p /to-do-app
# Change directory so that our commands run inside this new directory
WORKDIR /to-do-app
@orlando-c-h
orlando-c-h / app.component.html
Last active April 5, 2018 08:51
app.component.html
<app-to-do></app-to-do>
//zones can be entirely bypassed by bootstrapping the app with 'noop'
platformBrowserDynamic()
.bootstrapModule(AppModule, {ngZone: 'noop'})
.then( ref => {} );