master 1c6169699890 cached
41 files
16.1 KB
5.3k tokens
1 requests
Download .txt
Repository: abagayev/docker-bootstrap-collection
Branch: master
Commit: 1c6169699890
Files: 41
Total size: 16.1 KB

Directory structure:
gitextract_gmbhxb59/

├── LICENSE
├── README.md
├── crontab-in-container/
│   ├── README.md
│   ├── docker/
│   │   └── cron/
│   │       └── app
│   └── docker-compose.yml
├── docker-registry/
│   ├── Readme.md
│   ├── auth/
│   │   └── htpasswd
│   └── docker-compose.yml
├── dynamodb-local/
│   ├── README.md
│   └── docker-compose.yml
├── filebeat-logz-io/
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── filebeat.yml
│   └── logs/
│       └── example.log
├── lnmp-server/
│   ├── .gitignore
│   ├── README.md
│   ├── composer.json
│   ├── docker-compose.yml
│   └── public/
│       └── index.php
├── makefile-example/
│   ├── Makefile
│   ├── README.md
│   └── docker-compose.yml
├── multiple-services-with-common-network/
│   ├── Readme.md
│   ├── master/
│   │   ├── docker-compose.yml
│   │   └── public/
│   │       └── index.html
│   └── slave/
│       └── docker-compose.yml
├── mysql-few-databases/
│   ├── README.md
│   ├── docker/
│   │   └── provision/
│   │       └── mysql/
│   │           └── init/
│   │               └── 01-databases.sql
│   └── docker-compose.yml
├── php-cli/
│   ├── Readme.md
│   ├── app/
│   │   └── sum.php
│   └── docker-compose.yml
└── static-server/
    ├── .babelrc
    ├── .gitignore
    ├── Dockerfile
    ├── Readme.md
    ├── docker-compose.yml
    ├── package.json
    ├── public/
    │   └── index.html
    ├── src/
    │   └── index.js
    └── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018 Anton Bagaiev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# Docker bootstrap collection

Howdy! This is Docker bootstrap templates to start your new applications faster.

## Table of contents

Basic web applications:

* [Classic LNMP server](https://github.com/abagayev/docker-bootstrap-collection/tree/master/lnmp-server) 
* [Command line PHP](https://github.com/abagayev/docker-bootstrap-collection/tree/master/php-cli)
* [Simple static server for JS apps](https://github.com/abagayev/docker-bootstrap-collection/tree/master/static-server)

Basic databases and customization:

* [MySQL with few databases](https://github.com/abagayev/docker-bootstrap-collection/tree/master/mysql-few-databases)
* [DynamoDB for local development](https://github.com/abagayev/docker-bootstrap-collection/tree/master/dynamodb-local)

Operations and service observability:

* [Private Docker Registry](https://github.com/abagayev/docker-bootstrap-collection/tree/master/docker-registry)
* [Filebeat configuration](https://github.com/abagayev/docker-bootstrap-collection/tree/master/filebeat-logz-io)
* [Multiple docker compose services with common network](https://github.com/abagayev/docker-bootstrap-collection/tree/master/multiple-services-with-common-network)

Tips and hacks:

* [Crontab in container](https://github.com/abagayev/docker-bootstrap-collection/tree/master/crontab-in-container)
* [Makefile example](https://github.com/abagayev/docker-bootstrap-collection/tree/master/makefile-example)

## Also

Feel free to add comments, issues, pull requests or buy me a coffee:  
https://www.buymeacoffee.com/tonybug


================================================
FILE: crontab-in-container/README.md
================================================
# Crontab in docker compose example

To enable crontab in your docker compose you need to use docker image with preinstalled cron and share crontab schedule in volumes.  
To try this example you need to up your compose and see date appending to the logs file every minute. 

```shell
docker-compose up -d
cat logs/cron.log
```

Please don't forget to leave a blank line in the end of file.


================================================
FILE: crontab-in-container/docker/cron/app
================================================
# let's append current date to the log file every minute for a test
* * * * * root /bin/echo Hello from `date` >> /tmp/logs/cron.log


================================================
FILE: crontab-in-container/docker-compose.yml
================================================
app:
  image: webdevops/php-nginx
  volumes:
    - ./docker/cron:/etc/cron.d
    - ./logs:/tmp/logs


================================================
FILE: docker-registry/Readme.md
================================================
# Private Docker Registry

Run your registry with Docker compose, generate a login/password keys and login with new credentials:

```bash
docker-compose up -d
htpasswd -Bbn user pass > auth/htpasswd
docker login https://0.0.0.0:443
```

Then try to pull, tag and push an image to your new registry

```bash
docker pull ubuntu
docker tag ubuntu 0.0.0.0:5000/bubuntu
docker push 0.0.0.0:443/bubuntu
```

If you are having trouble with message like `server gave HTTP response to HTTPS client`, just follow this link: 
https://stackoverflow.com/questions/38695515/can-not-pull-push-images-after-update-docker-to-1-12


================================================
FILE: docker-registry/auth/htpasswd
================================================
user:$2y$05$cCibwxM8hHEijvPgmpk9he9nhxCiyPrw0CFLFVEwZUO.ImGuBM5hW


================================================
FILE: docker-registry/docker-compose.yml
================================================
registry:
  image: registry:2
  ports:
    - 443:5000
  environment:
    REGISTRY_AUTH: htpasswd
    REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
    REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
  volumes:
    - ./registry:/var/lib/registry
    - ./auth:/auth


================================================
FILE: dynamodb-local/README.md
================================================
# DynamoDB for local development

If you need DynamoDB at your project, just use this docker compose to add it to your environment.

Also, this is configured to store data at volume, if you need it to store data in memory, just remove volumes and command directives.

Also, this can be helpful for you:    
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html


================================================
FILE: dynamodb-local/docker-compose.yml
================================================
version: "3"

services:
  dynamodb:
    image: amazon/dynamodb-local
    volumes:
    - dynamodb:/home/dynamodblocal
    command: [
      "-jar",
      "DynamoDBLocal.jar",
      "-sharedDb",
      "-dbPath",
      "."
    ]

volumes:
  dynamodb:
    driver: local


================================================
FILE: filebeat-logz-io/README.md
================================================
# Filebeat configuration

This is an example of how to run Filebeat via Docker to send logs of your application to ELK stack at provider like [logz.io](https://logz.io).  

To make things work, do the next to prepare:

1. Create your configuration (or generate it with [configuration wizard](https://app.logz.io/#/dashboard/data-sources/Filebeat)) and store it to `filebeat.yml`

2. Add your logs directories to the list of volumes (or just try example logs prepared in _logs_ directiry)

3. Create certificates directory and download certificate
   

```shell
mkdir -p cert && curl https://raw.githubusercontent.com/logzio/public-certificates/master/COMODORSADomainValidationSecureServerCA.crt > cert/COMODORSADomainValidationSecureServerCA.crt
```

Finally, run docker compose and check your ELK:

```shell
docker-compose up -d
```

Can you see any logs? I hope you do.

================================================
FILE: filebeat-logz-io/docker-compose.yaml
================================================
version: "3"

services:
  filebeat:
    image: docker.elastic.co/beats/filebeat:7.6.1
    volumes:
    # filebeat configuration
    - "./filebeat.yml:/usr/share/filebeat/filebeat.yml:ro"

    # add your logs directories here
    - "./logs:/var/logs:ro"

    # install certificate
    - "./cert:/etc/pki/tls/certs:ro"

    # store filebeat data and don't lose it on container restart
    - "filebeat_data:/var/lib/filebeat:rw"

volumes:
  filebeat_data:
    driver: local


================================================
FILE: filebeat-logz-io/filebeat.yml
================================================
############################# Filebeat #####################################

filebeat.inputs:

- type: log
  paths:
  - /var/logs/*.log
  fields:
    logzio_codec: plain
    token: %LOGZ_TOKEN%
    type: nginx
  fields_under_root: true
  encoding: utf-8
  ignore_older: 3h

#For version 7 and higher
filebeat.registry.path: /var/lib/filebeat

#The following processors are to ensure compatibility with version 7
processors:
- rename:
    fields:
    - from: "agent"
      to: "beat_agent"
    ignore_missing: true
- rename:
    fields:
    - from: "log.file.path"
      to: "source"
    ignore_missing: true

############################# Output ##########################################

output:
  logstash:
    hosts: ["listener.logz.io:5015"]
    ssl:
      certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']


================================================
FILE: filebeat-logz-io/logs/example.log
================================================
{"@timestamp":"2020–03–11T12:00:00.00+00:00","message":"This is a test message, can't you see it?", "level":"INFO"}
{"@timestamp":"2020–03–11T13:00:00.00+00:00","message":"This is a test message number two, can't you see it too?", "level":"INFO"}
{"@timestamp":"2020–03–11T14:00:00.00+00:00","message":"This is a test message number three, can't you see a tree?", "level":"WARNING"}


================================================
FILE: lnmp-server/.gitignore
================================================
/docker/volumes
/vendor


================================================
FILE: lnmp-server/README.md
================================================
# Classic LNMP server

This is an example of classic LNMP application(linux, nginx, mysql, php). Just add this docker-compose file to your application, change mysql credentials and you are ready to go. 

To build and test service use next command and check your application reaching [localhost](http://localhost): 

```shell
docker-compose up -d
docker-compose exec app composer install
```

To connect with MySQL use next credentials(or change them in docker-compose):

```
MYSQL_HOST: db
MYSQL_PORT: 3306
MYSQL_DATABASE: lnmp
MYSQL_USER: root
MYSQL_PASSWORD: local
```

If you want to connect to MySQL from outside(for example, with your IDE), use `localhost` for a host and port `3308` instead.


================================================
FILE: lnmp-server/composer.json
================================================
{
    "require": {
    },
    "require-dev": {
        "fzaninotto/faker": "^1.7"
    }
}


================================================
FILE: lnmp-server/docker-compose.yml
================================================
app:
  image: webdevops/php-nginx-dev:7.1
  ports:
    - "80:80"
  volumes:
  - .:/app
  working_dir: /app
  environment:
    WEB_DOCUMENT_ROOT: /app/public
    PHP_DEBUGGER: xdebug
    PHP_IDE_CONFIG: serverName=lnmp-server
    XDEBUG_CONFIG: idekey=PHPSTORM
    XDEBUG_REMOTE_AUTOSTART: 1
    XDEBUG_REMOTE_CONNECT_BACK: 0
    XDEBUG_REMOTE_ENABLE: 1
    XDEBUG_REMOTE_HOST: docker.for.mac.localhost # 172.17.0.1 for linux users
    XDEBUG_PROFILER_ENABLE: 0
  links:
    - db

db:
  image: mysql:latest
  command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
  ports:
    - "3308:3306"
  volumes:
    - ./docker/volumes/db:/var/lib/mysql
  restart: always
  environment:
    MYSQL_DATABASE: lnmp
    MYSQL_USER: root
    MYSQL_PASSWORD: local
    MYSQL_ROOT_PASSWORD: local


================================================
FILE: lnmp-server/public/index.php
================================================
<?php

require_once '/app/vendor/autoload.php';

$faker = Faker\Factory::create();
$name = $faker->name;

echo 'Hello, my name is ', $name, PHP_EOL;


================================================
FILE: makefile-example/Makefile
================================================
up:
	docker-compose up -d

ps:
	docker-compose ps

stop:
	docker-compose stop

# combine two directives in one
restart: stop up

bash:
	docker-compose exec app bash


================================================
FILE: makefile-example/README.md
================================================
# Makefile example

Makefile is a powerful tool to manage your containers and services easier.    

It is good to make shortcuts with commands like docker-compose and running container scripts like migrations, provision, configuration.

For example, with Makefile in this folder, you can do the next: 

```shell
make up
make ps
make stop
make restart
make bash
```

Or even combine few directives from the command line, this will run your containers, show the list of them and get you inside of your app:

```shell
make up ps bash
```

Please notice that make is not installed as default, try this for ubuntu:
 
```shell
apt-get update && apt-get install build-essential
```


================================================
FILE: makefile-example/docker-compose.yml
================================================
app:
  image: nginx


================================================
FILE: multiple-services-with-common-network/Readme.md
================================================
# Multiple docker compose services with common network

Sometimes it is needed to share some resources between few docker compose services. For example, you are creating microservices with common database.  

To reach resource hosted on other service you need to create docker network and configure it as external network for both services.

In this example we are creating common network, master service with nginx and slave service with curl, witch can call nginx resource as well. 

```bash
# create and check network
docker network create services-common-network
docker network ls | grep services-common-network
 
# create master service
docker-compose -f master/docker-compose.yml up -d
 
# create slave service and test master nginx from slave
docker-compose -f slave/docker-compose.yml up -d
docker-compose -f slave/docker-compose.yml run alpine-curl nginx
```

To remove network you need to stop your services first (you can't remove network with active endpoints). 

```bash
docker-compose -f master/docker-compose.yml stop
docker-compose -f slave/docker-compose.yml stop
docker network rm services-common-network
```


================================================
FILE: multiple-services-with-common-network/master/docker-compose.yml
================================================
version: '3'

networks:
    services-common-network:
        external: true

services:
    nginx:
        image: nginx
        volumes:
          - ./public:/usr/share/nginx/html
        networks:
          - services-common-network


================================================
FILE: multiple-services-with-common-network/master/public/index.html
================================================
<h2>It works!</h2>


================================================
FILE: multiple-services-with-common-network/slave/docker-compose.yml
================================================
version: '3'

networks:
    services-common-network:
        external: true

services:
    alpine-curl:
        image: byrnedo/alpine-curl
        networks:
          - services-common-network


================================================
FILE: mysql-few-databases/README.md
================================================
# MySQL with few databases

This is an example of MySQL container with few databases.

Default MySQL image can create only one database out of the box, but we can customize it, adding SQL files to `/docker-entrypoint-initdb.d` directory.

Please notice, that MySQL will run these files only on container creation, and will not call them on next container start.

In this example we added SQL file with commands to run on container creation and create databases and grant all rights to them. We can create service and login inside mysql container to check out fresh databases:  

```bash
# start service
docker-compose up -d
 
# login to database and type password 'local'
docker-compose exec db mysql -uroot -p -e 'SHOW DATABASES;'
``` 

That's it!


================================================
FILE: mysql-few-databases/docker/provision/mysql/init/01-databases.sql
================================================
-- create databases
CREATE DATABASE IF NOT EXISTS `primary`;
CREATE DATABASE IF NOT EXISTS `secondary`;

-- create root user and grant rights
CREATE USER 'root'@'localhost' IDENTIFIED BY 'local';
GRANT ALL ON *.* TO 'root'@'localhost';


================================================
FILE: mysql-few-databases/docker-compose.yml
================================================
version: '3'

volumes:
    db:
        driver: local

services:
    db:
        image: mysql:5.7
        command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
        volumes:
          - ./docker/provision/mysql/init:/docker-entrypoint-initdb.d
        environment:
          MYSQL_ROOT_PASSWORD: local


================================================
FILE: php-cli/Readme.md
================================================
# Command line PHP

This is an example of basic PHP CLI with Xdebug installed. You can use it to develop terminal PHP applications from scratch. 

To build and test php cli service use next command: 

```shell
docker-compose up -d
docker-compose exec cli php sum.php 1 2 3
# Sum of your arguments is 6
```


================================================
FILE: php-cli/app/sum.php
================================================
<?php

$sum = array_sum($argv);
$message = "Sum of your arguments is $sum";

echo $message, PHP_EOL;


================================================
FILE: php-cli/docker-compose.yml
================================================
cli:
  image: webdevops/php-dev
  volumes:
  - ./app:/app
  working_dir: /app
  environment:
    PHP_IDE_CONFIG: serverName=php-cli
    XDEBUG_CONFIG: idekey=PHPSTORM
    XDEBUG_REMOTE_AUTOSTART: 1
    XDEBUG_REMOTE_CONNECT_BACK: 0
    XDEBUG_REMOTE_ENABLE: 1
    XDEBUG_REMOTE_HOST: docker.for.mac.localhost # 172.17.0.1 for linux users
    XDEBUG_PROFILER_ENABLE: 0


================================================
FILE: static-server/.babelrc
================================================
{
  "presets": [
    "env"
  ]
}

================================================
FILE: static-server/.gitignore
================================================
public/dist
node_modules


================================================
FILE: static-server/Dockerfile
================================================
FROM node:8.10

ARG BUILD_ID
ENV BUILD_ID ${BUILD_ID:-0}

COPY . ./app/
WORKDIR /app/

RUN apt-get update
RUN npm install

CMD ["npm", "run", "build"]


================================================
FILE: static-server/Readme.md
================================================
# Simple static server for JS apps

This is an example of static server with nginx and npm dependencies, webpack and babel. You can build and run your server calling next commands: 

```shell
docker-compose build
docker-compose up -d
```

Now you can open your application opening [localhost in browser](http://localhost). 

And you are ready to develop. Run watch script and it will update application automatically: 

```shell
docker-compose run node npm run-script watch
```


================================================
FILE: static-server/docker-compose.yml
================================================
nginx:
  image: nginx:latest
  working_dir: /usr/share/nginx/html
  ports:
    - "80:80"
  volumes:
    - ./public:/usr/share/nginx/html
  links:
    - node

node:
  build: .
  working_dir: /usr/src/app
  volumes:
   - .:/usr/src/app
  environment:
   BUILD_ID: 1



================================================
FILE: static-server/package.json
================================================
{
  "name": "app",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "build": "webpack",
    "dev": "webpack --mode development",
    "watch": "webpack --watch"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.4",
    "babel-preset-env": "^1.6.1",
    "babel-preset-es2015": "^6.24.1",
    "browser-cookies": "^1.2.0",
    "webpack": "^4.2.0",
    "webpack-cli": "^2.0.13"
  }
}


================================================
FILE: static-server/public/index.html
================================================
<!-- Your document -->
<h2>Hello</h2>
<p>Last time you was here <b id="last_visit">...</b></p>

<!-- Javascript SDK from CDN -->
<script type="text/javascript" src="dist/main.js"></script>
<script type="text/javascript">
    // show last visit time
    var last_visit = myApp.getLastVisit() || "never";
    document.getElementById("last_visit").textContent = last_visit;

    // set last visit time to now
    myApp.setLastVisit();
</script>


================================================
FILE: static-server/src/index.js
================================================
import cookies from "browser-cookies";

global.myApp = {
    // get last visit date from cookies
    getLastVisit: () => {
        const last_visit = cookies.get("last_visit");

        return last_visit;
    },

    // set last visit value
    setLastVisit: (value) => {
        cookies.set("last_visit", value || (new Date()).toISOString(), {
            expires: 365
        });
    }
};


================================================
FILE: static-server/webpack.config.js
================================================
var webpack = require('webpack');

module.exports = {
    output: {
        path:  __dirname + "/public/dist",
        filename: "main.js"
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: "babel-loader"
                }
            }
        ]
    },
    plugins: [
        new webpack.DefinePlugin({
            'SDK_BUILD_ID': JSON.stringify(process.env.BUILD_ID),
        })
    ]
};
Download .txt
gitextract_gmbhxb59/

├── LICENSE
├── README.md
├── crontab-in-container/
│   ├── README.md
│   ├── docker/
│   │   └── cron/
│   │       └── app
│   └── docker-compose.yml
├── docker-registry/
│   ├── Readme.md
│   ├── auth/
│   │   └── htpasswd
│   └── docker-compose.yml
├── dynamodb-local/
│   ├── README.md
│   └── docker-compose.yml
├── filebeat-logz-io/
│   ├── README.md
│   ├── docker-compose.yaml
│   ├── filebeat.yml
│   └── logs/
│       └── example.log
├── lnmp-server/
│   ├── .gitignore
│   ├── README.md
│   ├── composer.json
│   ├── docker-compose.yml
│   └── public/
│       └── index.php
├── makefile-example/
│   ├── Makefile
│   ├── README.md
│   └── docker-compose.yml
├── multiple-services-with-common-network/
│   ├── Readme.md
│   ├── master/
│   │   ├── docker-compose.yml
│   │   └── public/
│   │       └── index.html
│   └── slave/
│       └── docker-compose.yml
├── mysql-few-databases/
│   ├── README.md
│   ├── docker/
│   │   └── provision/
│   │       └── mysql/
│   │           └── init/
│   │               └── 01-databases.sql
│   └── docker-compose.yml
├── php-cli/
│   ├── Readme.md
│   ├── app/
│   │   └── sum.php
│   └── docker-compose.yml
└── static-server/
    ├── .babelrc
    ├── .gitignore
    ├── Dockerfile
    ├── Readme.md
    ├── docker-compose.yml
    ├── package.json
    ├── public/
    │   └── index.html
    ├── src/
    │   └── index.js
    └── webpack.config.js
Condensed preview — 41 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (20K chars).
[
  {
    "path": "LICENSE",
    "chars": 1070,
    "preview": "MIT License\n\nCopyright (c) 2018 Anton Bagaiev\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
  },
  {
    "path": "README.md",
    "chars": 1546,
    "preview": "# Docker bootstrap collection\n\nHowdy! This is Docker bootstrap templates to start your new applications faster.\n\n## Tabl"
  },
  {
    "path": "crontab-in-container/README.md",
    "chars": 390,
    "preview": "# Crontab in docker compose example\n\nTo enable crontab in your docker compose you need to use docker image with preinsta"
  },
  {
    "path": "crontab-in-container/docker/cron/app",
    "chars": 133,
    "preview": "# let's append current date to the log file every minute for a test\n* * * * * root /bin/echo Hello from `date` >> /tmp/l"
  },
  {
    "path": "crontab-in-container/docker-compose.yml",
    "chars": 100,
    "preview": "app:\n  image: webdevops/php-nginx\n  volumes:\n    - ./docker/cron:/etc/cron.d\n    - ./logs:/tmp/logs\n"
  },
  {
    "path": "docker-registry/Readme.md",
    "chars": 613,
    "preview": "# Private Docker Registry\n\nRun your registry with Docker compose, generate a login/password keys and login with new cred"
  },
  {
    "path": "docker-registry/auth/htpasswd",
    "chars": 66,
    "preview": "user:$2y$05$cCibwxM8hHEijvPgmpk9he9nhxCiyPrw0CFLFVEwZUO.ImGuBM5hW\n"
  },
  {
    "path": "docker-registry/docker-compose.yml",
    "chars": 259,
    "preview": "registry:\n  image: registry:2\n  ports:\n    - 443:5000\n  environment:\n    REGISTRY_AUTH: htpasswd\n    REGISTRY_AUTH_HTPAS"
  },
  {
    "path": "dynamodb-local/README.md",
    "chars": 391,
    "preview": "# DynamoDB for local development\n\nIf you need DynamoDB at your project, just use this docker compose to add it to your e"
  },
  {
    "path": "dynamodb-local/docker-compose.yml",
    "chars": 265,
    "preview": "version: \"3\"\n\nservices:\n  dynamodb:\n    image: amazon/dynamodb-local\n    volumes:\n    - dynamodb:/home/dynamodblocal\n   "
  },
  {
    "path": "filebeat-logz-io/README.md",
    "chars": 871,
    "preview": "# Filebeat configuration\n\nThis is an example of how to run Filebeat via Docker to send logs of your application to ELK s"
  },
  {
    "path": "filebeat-logz-io/docker-compose.yaml",
    "chars": 471,
    "preview": "version: \"3\"\n\nservices:\n  filebeat:\n    image: docker.elastic.co/beats/filebeat:7.6.1\n    volumes:\n    # filebeat config"
  },
  {
    "path": "filebeat-logz-io/filebeat.yml",
    "chars": 855,
    "preview": "############################# Filebeat #####################################\n\nfilebeat.inputs:\n\n- type: log\n  paths:\n  -"
  },
  {
    "path": "filebeat-logz-io/logs/example.log",
    "chars": 383,
    "preview": "{\"@timestamp\":\"2020–03–11T12:00:00.00+00:00\",\"message\":\"This is a test message, can't you see it?\", \"level\":\"INFO\"}\n{\"@t"
  },
  {
    "path": "lnmp-server/.gitignore",
    "chars": 24,
    "preview": "/docker/volumes\n/vendor\n"
  },
  {
    "path": "lnmp-server/README.md",
    "chars": 698,
    "preview": "# Classic LNMP server\n\nThis is an example of classic LNMP application(linux, nginx, mysql, php). Just add this docker-co"
  },
  {
    "path": "lnmp-server/composer.json",
    "chars": 90,
    "preview": "{\n    \"require\": {\n    },\n    \"require-dev\": {\n        \"fzaninotto/faker\": \"^1.7\"\n    }\n}\n"
  },
  {
    "path": "lnmp-server/docker-compose.yml",
    "chars": 808,
    "preview": "app:\n  image: webdevops/php-nginx-dev:7.1\n  ports:\n    - \"80:80\"\n  volumes:\n  - .:/app\n  working_dir: /app\n  environment"
  },
  {
    "path": "lnmp-server/public/index.php",
    "chars": 149,
    "preview": "<?php\n\nrequire_once '/app/vendor/autoload.php';\n\n$faker = Faker\\Factory::create();\n$name = $faker->name;\n\necho 'Hello, m"
  },
  {
    "path": "makefile-example/Makefile",
    "chars": 165,
    "preview": "up:\n\tdocker-compose up -d\n\nps:\n\tdocker-compose ps\n\nstop:\n\tdocker-compose stop\n\n# combine two directives in one\nrestart: "
  },
  {
    "path": "makefile-example/README.md",
    "chars": 675,
    "preview": "# Makefile example\n\nMakefile is a powerful tool to manage your containers and services easier.    \n\nIt is good to make s"
  },
  {
    "path": "makefile-example/docker-compose.yml",
    "chars": 20,
    "preview": "app:\n  image: nginx\n"
  },
  {
    "path": "multiple-services-with-common-network/Readme.md",
    "chars": 1127,
    "preview": "# Multiple docker compose services with common network\n\nSometimes it is needed to share some resources between few docke"
  },
  {
    "path": "multiple-services-with-common-network/master/docker-compose.yml",
    "chars": 233,
    "preview": "version: '3'\n\nnetworks:\n    services-common-network:\n        external: true\n\nservices:\n    nginx:\n        image: nginx\n "
  },
  {
    "path": "multiple-services-with-common-network/master/public/index.html",
    "chars": 19,
    "preview": "<h2>It works!</h2>\n"
  },
  {
    "path": "multiple-services-with-common-network/slave/docker-compose.yml",
    "chars": 193,
    "preview": "version: '3'\n\nnetworks:\n    services-common-network:\n        external: true\n\nservices:\n    alpine-curl:\n        image: b"
  },
  {
    "path": "mysql-few-databases/README.md",
    "chars": 749,
    "preview": "# MySQL with few databases\n\nThis is an example of MySQL container with few databases.\n\nDefault MySQL image can create on"
  },
  {
    "path": "mysql-few-databases/docker/provision/mysql/init/01-databases.sql",
    "chars": 236,
    "preview": "-- create databases\nCREATE DATABASE IF NOT EXISTS `primary`;\nCREATE DATABASE IF NOT EXISTS `secondary`;\n\n-- create root "
  },
  {
    "path": "mysql-few-databases/docker-compose.yml",
    "chars": 335,
    "preview": "version: '3'\n\nvolumes:\n    db:\n        driver: local\n\nservices:\n    db:\n        image: mysql:5.7\n        command: mysqld"
  },
  {
    "path": "php-cli/Readme.md",
    "chars": 306,
    "preview": "# Command line PHP\n\nThis is an example of basic PHP CLI with Xdebug installed. You can use it to develop terminal PHP ap"
  },
  {
    "path": "php-cli/app/sum.php",
    "chars": 101,
    "preview": "<?php\n\n$sum = array_sum($argv);\n$message = \"Sum of your arguments is $sum\";\n\necho $message, PHP_EOL;\n"
  },
  {
    "path": "php-cli/docker-compose.yml",
    "chars": 368,
    "preview": "cli:\n  image: webdevops/php-dev\n  volumes:\n  - ./app:/app\n  working_dir: /app\n  environment:\n    PHP_IDE_CONFIG: serverN"
  },
  {
    "path": "static-server/.babelrc",
    "chars": 32,
    "preview": "{\n  \"presets\": [\n    \"env\"\n  ]\n}"
  },
  {
    "path": "static-server/.gitignore",
    "chars": 25,
    "preview": "public/dist\nnode_modules\n"
  },
  {
    "path": "static-server/Dockerfile",
    "chars": 151,
    "preview": "FROM node:8.10\n\nARG BUILD_ID\nENV BUILD_ID ${BUILD_ID:-0}\n\nCOPY . ./app/\nWORKDIR /app/\n\nRUN apt-get update\nRUN npm instal"
  },
  {
    "path": "static-server/Readme.md",
    "chars": 478,
    "preview": "# Simple static server for JS apps\n\nThis is an example of static server with nginx and npm dependencies, webpack and bab"
  },
  {
    "path": "static-server/docker-compose.yml",
    "chars": 265,
    "preview": "nginx:\n  image: nginx:latest\n  working_dir: /usr/share/nginx/html\n  ports:\n    - \"80:80\"\n  volumes:\n    - ./public:/usr/"
  },
  {
    "path": "static-server/package.json",
    "chars": 498,
    "preview": "{\n  \"name\": \"app\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"build\": \"webpack"
  },
  {
    "path": "static-server/public/index.html",
    "chars": 442,
    "preview": "<!-- Your document -->\n<h2>Hello</h2>\n<p>Last time you was here <b id=\"last_visit\">...</b></p>\n\n<!-- Javascript SDK from"
  },
  {
    "path": "static-server/src/index.js",
    "chars": 391,
    "preview": "import cookies from \"browser-cookies\";\n\nglobal.myApp = {\n    // get last visit date from cookies\n    getLastVisit: () =>"
  },
  {
    "path": "static-server/webpack.config.js",
    "chars": 514,
    "preview": "var webpack = require('webpack');\n\nmodule.exports = {\n    output: {\n        path:  __dirname + \"/public/dist\",\n        f"
  }
]

About this extraction

This page contains the full source code of the abagayev/docker-bootstrap-collection GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 41 files (16.1 KB), approximately 5.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!