Skip to content

Instantly share code, notes, and snippets.

View aherve's full-sized avatar

Aurélien aherve

View GitHub Profile
web:
image: wordpress
links:
- mysql
environment:
- WORDPRESS_DB_PASSWORD=myPass
working_dir: /var/www/html
volumes_from:
- data
ports:
backup:
image: tutum/dockup
volumes_from:
- data
environment:
- AWS_ACCESS_KEY_ID=<ACCESS_KEY>
- AWS_SECRET_ACCESS_KEY=<SECRET>
- AWS_DEFAULT_REGION=eu-west-1
- BACKUP_NAME=my-blog-backup
- PATHS_TO_BACKUP=/var/lib/mysql /var/www/html/wp-content
web:
image: wordpress
links:
- mysql
environment:
- WORDPRESS_DB_PASSWORD=myPass
working_dir: /var/www/html
volumes_from:
- data
ports:
/* HELLO.JS */
// import some libraries
var express = require('express')
// Perhaps you'll want to code something more elaborated here.
module.exports = function count () {
return 1
}
hello:
links:
- "db:db"
build: .
volumes:
- .:/app
- /app/node_modules
command: node ./src/hello.js
environment:
- NODE_ENV=development
FROM mhart/alpine-node:5
RUN mkdir -p /app
WORKDIR /app
ADD ./package.json .
RUN npm install -g mocha
RUN npm install
- name: my_test
service: test
command: true # run default
FROM mhart/alpine-node:5
RUN mkdir -p /app
RUN npm install -g mocha
ADD ./base-package.json /tmp/package.json
RUN cd /tmp && npm install
# use our bootstrap image
FROM bootstrap_demo
# /app already exists. no need to create it
WORKDIR /app
# add the precompiled node_modules to our workdir
RUN ln -sf /tmp/node_modules .
# Add the newest package.json. Perhaps it's different from base-package.json. Perhaps not
'use strict'
import async from 'async'
export default function postCreatePlugin (schema) {
schema.addPostCreate = function (f) {
schema.postCreateListeners = schema.postCreateListeners || []
schema.postCreateListeners.push(f)
}
schema.pre('save', function (next) {