Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Use Docker Compose to develop lineblocs

## Notice
Please make sure use docker compose with minimal version 2.2

## Structure of directory
```shell
.
Expand Down Expand Up @@ -27,6 +30,7 @@ $ cd dev
$ cp .env.example .env
$ docker compose build --no-cache
$ docker compose --profile enable_mysql --profile enable_proxy up -d
$ docker compose --profile enable_mysql --profile enable_proxy watch
```
Open web browser
`http://127.0.0.1:22023` -> `site lineblocs`
Expand Down Expand Up @@ -57,7 +61,7 @@ $ cd ..
$ cd dev
```

### Make .env file and confige
### Make .env file and config
```shell
$ cp .env.example .env
```
Expand Down Expand Up @@ -91,7 +95,9 @@ Create and run container with this command below.
```shell
$ docker compose --profile enable_mysql --profile enable_proxy up -d
```

```shell
$ docker compose --profile enable_mysql --profile enable_proxy watch
```
### Access lineblocs
Lineblocs-site -> http://127.0.0.1:{MYSQL_PORT_HOST} or http://{DEPLOYMENT_DOMAIN} `--enable_proxy` must use
Lineblocs-phpmyadmin -> -> http://127.0.0.1:{PHPMYADMIN_PORT_HOST} or http://{DEPLOYMENT_DOMAIN} `--enable_proxy` must use
Expand Down
30 changes: 27 additions & 3 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,41 @@ services:
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
site:
# use image from docker hub. Need side project live but not develop site project
# use this image below from docker hub. Need site project live but not develop site project
#image: lineblocs/site:master
# end of use image from docker hub
# use dockerfile as image. Development site project, use this config
build:
context: ../app
dockerfile: Dockerfile
image: lineblocs-site
volumes:
- ../app:/var/www/html
# end of use docekrfile as image
# Please choose, use block of "volumes" or "develop"
# volumes:
# - ../app:/var/www/html
develop:
watch:
- action: sync
path: ../app
target: /var/www/html
ignore:
- node_modules/
- vendor/
- action: sync+restart
path: ../app/shell_scripts/entrypoint.sh
target: /var/www/html/shell_scripts/entrypoint.sh
- action: sync+restart
path: ../app/composer.json
target: /var/www/html/composer.json
- action: sync+restart
path: ../app/package.json
target: /var/www/html/package.json
- action: rebuild
path: ../app/Dockerfile
- action: rebuild
path: ./docker-compose.yaml
- action: rebuild
path: ./.env
logging: *default-logging
container_name: lineblocs-site
restart: unless-stopped
Expand Down