Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elipzis/docker-compose-collection
A set of helpful Docker containers for local development.
https://github.com/elipzis/docker-compose-collection
development docker docker-compose localhost
Last synced: about 2 months ago
JSON representation
A set of helpful Docker containers for local development.
- Host: GitHub
- URL: https://github.com/elipzis/docker-compose-collection
- Owner: elipZis
- License: mit
- Created: 2020-04-16T08:16:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-01T09:46:25.000Z (over 3 years ago)
- Last Synced: 2023-08-31T12:53:18.794Z (over 1 year ago)
- Topics: development, docker, docker-compose, localhost
- Language: Shell
- Size: 22.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Compose Collection
A set of helpful Docker containers for local development.## How to use the Docker Compose Collection in your environment
### Prerequisites
First install Docker CE for your system (https://docs.docker.com/install/).Then proceed to install mkcert (https://github.com/FiloSottile/mkcert) and create a local CA Root certificate by calling `mkcert -install`.
### Notes
This utilizes `docker-compose` to boot up all requirements and scripts. The `docker-compose.yml` is part of the root directory and every `docker-compose ...` command has to be called in there (preferably with root rights).Additional files and scripts are located in `./.docker` for booting up the images and creating the according configuration.
### Setup
Execute the `./.docker/create-certs.sh` script to create the local certified SSL certificates with mkcert, which are passed to `nginx` as valid.Ensure that your `.env` file is complete and correct before you run the containers. If you make changes to the `.env` you have to remove all containers `docker-compose down`, build them `docker-compose build` and run again. If you down containers, they are removed! Initial setup has to be repeated (e.g. database seeding etc.).
### Run
Call `docker-compose up -d nginx`. This will boot up the nginx, php and mysql systems to use and interconnect everything in one network. The initial boot time might be long because `docker` has to build the images the first time.#### Working with the containers
* Stop containers: `docker-compose stop ...`
* Remove all containers: `docker-compose down`
* Boot up: `docker-compose up -d nginx` (-d for daemon mode)You may change the `docker-compose.yml` to set all containers to `restart: always`. They will restart in case of errors etc.
### Profit!
The server is running at `https://localhost:8443`. The certificate is valid and everything is prepared.You may also change your local `hosts` information, as the certificate is generated for
* development.local
* development.test
* development.appMost other containers such as `redis` etc. map their native default port to the same local machine port.