ansible-galaxy install -p roles geerlingguy.docker
ansible-playbook site.yml
chmod +x deploy.sh
This file contains hidden or 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" | |
| "log" | |
| "net/http" | |
| "regexp" | |
| "time" |
This file contains hidden or 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
| const { exec } = require('child_process'); | |
| const view = ` | |
| <pre style="height:300px; overflow: auto; border: 1px solid #eee" id="history"> | |
| </pre> | |
| <form method="post" id="form"> | |
| <input type="text" name="command" size="100" id="command" /> | |
| <button>Run</button> | |
| </form> | |
| <script> |
This file contains hidden or 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
| [defaults] | |
| inventory = hosts | |
| pipelining = True | |
| timeout = 30 |
This file contains hidden or 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
| module Main exposing (..) | |
| import Browser | |
| import Html exposing (Html, button, div, text) | |
| import Html.Events exposing (onClick) | |
| import Random | |
| main : Program () Model Msg | |
| main = | |
| Browser.element { init = \_ -> init, update = update, view = view, subscriptions = \_ -> Sub.none } |
This file contains hidden or 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.13.4-alpine3.10 as build | |
| RUN apk add --update git | |
| WORKDIR /app | |
| COPY go.mod go.sum /app/ | |
| RUN go mod download | |
| COPY . . | |
| RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-w -extldflags "-static"' -o app . |
This file contains hidden or 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 fpco/stack-build:lts-14.20 as build | |
| WORKDIR /app | |
| COPY .init-stack.yaml stack.yaml | |
| COPY .init-stack.yaml.lock stack.yaml.lock | |
| COPY .init-package.yaml package.yaml | |
| RUN stack build --only-dependencies | |
| COPY . . |
This file contains hidden or 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
| job "consul-exporter" { | |
| datacenters = ["dc1"] | |
| group "consul-exporter" { | |
| task "consul-exporter" { | |
| driver = "exec" | |
| artifact { | |
| source = "https://github.com/prometheus/consul_exporter/releases/download/v0.4.0/consul_exporter-0.4.0.linux-amd64.tar.gz" | |
| options { |
This file contains hidden or 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
| vars: | |
| version: "{{ ansible_date_time.epoch }}" | |
| backend_container_name: "backend-{{ version }}" | |
| tasks: | |
| - name: Run backend container | |
| docker_container: | |
| <<: *base-app | |
| name: "{{ backend_container_name }}" | |
| command: bundle exec puma -C config/puma.rb -t 1:3 |
This file contains hidden or 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
| const fetch = require('node-fetch'); | |
| const MoyskladCore = require('moysklad'); | |
| const MoyskladQueueExtension = require('moysklad-extension-queue'); | |
| const { loadRows } = require('moysklad-tools'); | |
| const { readFileSync } = require('fs'); | |
| const Moysklad = MoyskladCore.compose(MoyskladQueueExtension); | |
| const ms = Moysklad({ | |
| queue: true, | |
| fetch, |