Skip to content

Instantly share code, notes, and snippets.

View Gary-Ascuy's full-sized avatar
🔥
Thinking ...

Gary Ascuy Gary-Ascuy

🔥
Thinking ...
View GitHub Profile
# Docker Meteor
FROM node:4.8.1-alpine
MAINTAINER Gary Ascuy <gary.ascuy@gmail.com>
ENV BUILD_PACKAGES="python make gcc g++ git libuv bash curl tar bzip2" \
NODE_ENV=production \
ROOT_URL=http://localhost:3000 \
PORT=3000
WORKDIR /root/app/bundle
@Gary-Ascuy
Gary-Ascuy / Dockerfile
Last active April 29, 2017 22:31
Docker + Meteor
# Dockerfile for Meteor App
FROM node:4.8.2-alpine
MAINTAINER Gary Ascuy <gary.ascuy@gmail.com>
ENV BUILD_PACKAGES="python make gcc g++ git libuv bash curl tar bzip2" \
NODE_ENV=production \
ROOT_URL=http://localhost:3000 \
PORT=3000
WORKDIR /root/app/bundle
@Gary-Ascuy
Gary-Ascuy / docker_meteor_create_build.sh
Last active April 30, 2017 02:22
Docker + Meteor - Create a linux build
# create meteor build for linux
meteor build ../build --server-only --architecture os.linux.x86_64
@Gary-Ascuy
Gary-Ascuy / gist:66324e01acc47747e4d40316596bd4ca
Created April 30, 2017 02:35
docker_meteor_clone_todos_app.sh
# clone source code from github
git clone https://github.com/dockercochabamba/todos.git
@Gary-Ascuy
Gary-Ascuy / gist:4d51239a1a85a22dff450651fd3b2729
Created April 30, 2017 02:36
docker_meteor_clone_todos_app.sh
# clone source code from github
git clone https://github.com/dockercochabamba/todos.git
@Gary-Ascuy
Gary-Ascuy / docker_meteor_clone_todos_app.Dockerfile
Created April 30, 2017 02:55
Dockefile template for Meteor application
# Dockerfile for Meteor App
FROM node:4.8.2-alpine
MAINTAINER Gary Ascuy <gary.ascuy@gmail.com>
ENV BUILD_PACKAGES="python make gcc g++ git libuv bash curl tar bzip2" \
NODE_ENV=production \
ROOT_URL=http://localhost:3000 \
PORT=3000
WORKDIR /root/app/bundle
# create a docker image from Dockerfile
docker build -t garyascuy/todos .
# push "garyascuy/todos" image to https://hub.docker.com/
docker push garyascuy/todos
@Gary-Ascuy
Gary-Ascuy / docker_meteor_start_enable_docker.sh
Created May 2, 2017 01:46
Start and Enable docker service in CentOS
# Start docker service
systemctl start docker
# Enable docker service to start with OS on reboots
systemctl enable docker
# Verify docker service
systemctl status docker
# pull mongodb image from Docker hub
docker pull mongo:3.2
# run mongodb container
docker run -d --restart=always \
-v /root/database/:/data/db \
--name mongodb \
mongo:3.2 mongod --smallfiles --nohttpinterface --replSet rs0
# configure replica set, and create oplog user
# puling todos image from public docker hub
docker pull meteorjs/todos:latest
# run meteor container
docker run -d -p 80:3000 --restart=always \
--link mongodb \
-e MONGO_URL=mongodb://mongodb:27017/todos \
-e MONGO_OPLOG_URL=mongodb://oplogger:master@mongodb:27017/local?authSource=admin \
--name=todos \
meteorjs/todos:latest