Simple docker-compose.yml file with pre-configured services.
Can create multiple environment, start with local
Inspired by Devilbox
- Install Docker and Docker Compose on your system.
git clone https://github.com/giuseppemorelli/docker-devbox.git
cd docker-devbox
-
Copy the example environment file and adjust as needed:
cp local/env.dist local/.env # Edit local/.env to match your requirements
-
Uncomment the services you want to use in the
docker-compose.yml
file.
For example, to enable MySQL, uncomment the following lines:mysql: container_name: ${COMPOSE_PROJECT_NAME}_${MYSQL_SERVER_NAME} image: ${MYSQL_SERVER} environment: MYSQL_ROOT_PASSWORD: "docker" # for mysql 8 comment user and password user, need to create via script only for legacy project MYSQL_USER: "local" MYSQL_PASSWORD: "local" # ....
- From the environment root, run:
cd local docker-compose up -d
- To stop the services:
cd local docker-compose down -v