Skip to content

Commit 47cff41

Browse files
update version and add instructions
1 parent d0292aa commit 47cff41

File tree

5 files changed

+64
-11
lines changed

5 files changed

+64
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

3-
## WIP
3+
## 0.1.5
4+
5+
### Added
46
- add new service for golang
57
- add new service for mailpit
68

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,59 @@
1010
Simple docker-compose.yml file with pre-configured services.
1111
Can create multiple environment, start with `local`
1212

13-
How-to: work in progress
14-
1513
Inspired by [Devilbox](http://devilbox.org/)
14+
15+
---
16+
17+
## How to Use the Docker DEV Box
18+
19+
### 1. Prerequisites
20+
21+
- Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) on your system.
22+
23+
### 2. Clone the Repository
24+
25+
```sh
26+
git clone https://github.com/giuseppemorelli/docker-devbox.git
27+
cd docker-devbox
28+
```
29+
30+
### 3. Configure Your Environment
31+
32+
- Copy the example environment file and adjust as needed:
33+
```sh
34+
cp local/env.dist local/.env
35+
# Edit local/.env to match your requirements
36+
```
37+
38+
- Uncomment the services you want to use in the `docker-compose.yml` file.
39+
For example, to enable MySQL, uncomment the following lines:
40+
```yaml
41+
mysql:
42+
container_name: ${COMPOSE_PROJECT_NAME}_${MYSQL_SERVER_NAME}
43+
image: ${MYSQL_SERVER}
44+
45+
environment:
46+
MYSQL_ROOT_PASSWORD: "docker"
47+
# for mysql 8 comment user and password user, need to create via script only for legacy project
48+
MYSQL_USER: "local"
49+
MYSQL_PASSWORD: "local"
50+
# ....
51+
```
52+
53+
### 4. Start the Services
54+
55+
- From the environment root, run:
56+
```sh
57+
cd local
58+
docker-compose up -d
59+
```
60+
61+
### 5. Stopping and Cleaning Up
62+
63+
- To stop the services:
64+
```sh
65+
cd local
66+
docker-compose down -v
67+
```
68+

local/docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
## $ cp env-example .env
77
##
88

9-
version: '3'
10-
119
################################################################################
1210
# SERVICES
1311
################################################################################

local/env.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ ENVIRONMENT=local
5353
################################################################################
5454

5555
WEB_SERVER=giuseppemorelli/devbox-apache-php:8.2
56-
PHP_VERSION=7.3
57-
NODEJS_SERVER=node:14
58-
MYSQL_SERVER=mysql:5.7
56+
PHP_VERSION=8.2
57+
NODEJS_SERVER=node:18
58+
MYSQL_SERVER=mysql:8
5959
REDIS_SERVER=redis:latest
6060
REDIS_COMMANDER_SERVER=rediscommander/redis-commander
6161
PHPMYADMIN_SERVICE=phpmyadmin/phpmyadmin

local/provision/bin/db_tasks.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ echo "CREATE DATABASE"
44
# mysql -u root -pdocker -e "CREATE DATABASE mydatabase"
55
echo "SETTING UP local USER"
66
# for mysql < 8
7-
mysql -u root -pdocker -e "REVOKE ALL PRIVILEGES ON *.* FROM 'local'@'%'; GRANT ALL PRIVILEGES ON *.* TO 'local'@'%' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;"
7+
# mysql -u root -pdocker -e "REVOKE ALL PRIVILEGES ON *.* FROM 'local'@'%'; GRANT ALL PRIVILEGES ON *.* TO 'local'@'%' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;"
88
# for mysql >= 8
9-
## mysql -u root -pdocker -e "CREATE USER 'local'@'%' IDENTIFIED WITH mysql_native_password BY 'local';"
10-
# mysql -u root -pdocker -e "GRANT ALL PRIVILEGES ON *.* TO 'local'@'%' WITH GRANT OPTION;"
9+
mysql -u root -pdocker -e "CREATE USER 'local'@'%' IDENTIFIED WITH mysql_native_password BY 'local';"
10+
mysql -u root -pdocker -e "GRANT ALL PRIVILEGES ON *.* TO 'local'@'%' WITH GRANT OPTION;"

0 commit comments

Comments
 (0)