mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
74dca8091c2236b3534e9fd4970f8af818d58553
Nick Yeoman's Collection of Docker compose files
Author: Nick Yeoman.
These cookbooks are created with the intent of using Docker's extend feature. This way, you can run multiple containers in different domains but still have only one file to update.
These compose files make a few assumptions:
- You are only running on one host.
- You are using Nginx Proxy Manager (although most have redundant port access).
- Volumes are stored in the project folder under "data", git ignored and backed up externally.
The intended workflow is as follows:
- Clone the repository locally
git clone git@github.com:nickyeoman/docker-compose-cookbooks.git /git-repos/docker-compose-cookbooks - Create a project directory, usually by domain
mkdir /projects/domainname-com - Create a .env file in the project directory
touch .env - Add the COOKBOOK Variable to the project's env file:
COOKBOOK=/git-repos/docker-compose-cookbooks - Create a .gitignore file in the project directory and ignore "data/"
- Create a docker-compose.yml file in the project directory with the external code given in the README file in the container folder.
Example
Here is an example of how your project's docker-compose file might look:
version: '3.4'
networks:
proxy:
external: true
services:
proxy:
extends:
file: ${COOKBOOK}/nginx-proxy-manager/docker-compose.yml
service: proxy
env_file:
- .env
networks:
- proxy
Languages
Python
31.8%
Shell
29.6%
HTML
22.7%
Dockerfile
15.9%