This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
yum update | |
yum install -y httpd | |
service httpd start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
service httpd restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var AWS = require('aws-sdk'), | |
transcoder = new AWS.ElasticTranscoder({ | |
apiVersion: '2012-09-25', | |
region: 'us-east-1' | |
}); | |
exports.handler = (event, context, callback) => { | |
let fileName = event.Records[0].s3.object.key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MySQL = require('mysql'), | |
express = require('express'), | |
app = express(); | |
var connection = MySQL.createConnection({ | |
host : process.env.MYSQL_HOST || 'localhost', | |
user : process.env.MYSQL_USER || '', | |
password : process.env.MYSQL_PASSWORD || '' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8.7.0 | |
MAINTAINER mlabouardy <[email protected]> | |
WORKDIR /app | |
RUN npm install mysql express | |
COPY server.js . | |
EXPOSE 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.0" | |
services: | |
mysql: | |
image: mysql:5.6 | |
environment: | |
- MYSQL_ROOT_PASSWORD=root | |
networks: | |
- db-net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8.7.0 | |
MAINTAINER mlabouardy <[email protected]> | |
RUN apt-get update && apt-get install -y wget | |
ENV DOCKERIZE_VERSION v0.5.0 | |
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"github.com/mlabouardy/9gag" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.9.1 AS builder | |
MAINTAINER mlabouardy <[email protected]> | |
WORKDIR /go/src/github.com/mlabouardy/Memes9Gag | |
RUN go get -d -v github.com/mlabouardy/9gag | |
COPY handler.go . | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . | |
FROM alpine:latest | |
RUN apk --no-cache add ca-certificates | |
ADD https://github.com/openfaas/faas/releases/download/0.5.1-alpha/fwatchdog /usr/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider: | |
name: faas | |
gateway: http://localhost:8080 | |
functions: | |
memes-9gag: | |
lang: Dockerfile | |
handler: ./function | |
image: mlabouardy/memes-9gag |