Separate variable flag container path out from APP_CODE_PATH_CONTAINER (#1591)

Because Container cannot volume when use APP_CODE_PATH_CONTAINER (with flag) concat with path name, e.g. /var/www:nocache/letencrypt
This will fix 1540.
This commit is contained in:
hawkup 2019-02-09 18:57:11 +07:00 committed by Shao Yu-Lung (Allen)
parent c7aa535598
commit 1d420a2507
3 changed files with 14 additions and 11 deletions

View File

@ -1832,7 +1832,7 @@ Laradock comes with `sync.sh`, an optional bash script, that automates installin
DOCKER_SYNC_STRATEGY=native_osx
```
3) set `APP_CODE_PATH_CONTAINER=/var/www` to `APP_CODE_PATH_CONTAINER=/var/www:nocopy` in the .env file
3) set `APP_CODE_CONTAINER_FLAG` to `APP_CODE_CONTAINER_FLAG=:nocopy` in the .env file
4) Install the docker-sync gem on the host-machine:
```bash

View File

@ -107,7 +107,7 @@ services:
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
ports:
@ -164,7 +164,7 @@ services:
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
expose:
- "9000"
extra_hosts:
@ -197,7 +197,7 @@ services:
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ./php-worker/supervisord.d:/etc/supervisord.d
depends_on:
- workspace
@ -233,7 +233,7 @@ services:
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
- CHANGE_SOURCE=${CHANGE_SOURCE}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
@ -267,7 +267,7 @@ services:
- PHP_UPSTREAM_TIMEOUT=${APACHE_PHP_UPSTREAM_TIMEOUT}
- DOCUMENT_ROOT=${APACHE_DOCUMENT_ROOT}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
- ${APACHE_SITES_PATH}:/etc/apache2/sites-available
ports:
@ -283,7 +283,7 @@ services:
hhvm:
build: ./hhvm
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
expose:
- "9000"
depends_on:
@ -536,7 +536,7 @@ services:
caddy:
build: ./caddy
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${CADDY_CONFIG_PATH}:/etc/caddy
- ${CADDY_HOST_LOG_PATH}:/var/log/caddy
- ${DATA_PATH_HOST}:/root/.caddy
@ -909,7 +909,7 @@ services:
build:
context: ./aws
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
depends_on:
- workspace
tty: true

View File

@ -7,8 +7,11 @@
# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../
# Point to where the `APP_CODE_PATH_HOST` should be in the container. You may add flags to the path `:cached`, `:delegated`. When using Docker Sync add `:nocopy`
APP_CODE_PATH_CONTAINER=/var/www:cached
# Point to where the `APP_CODE_PATH_HOST` should be in the container
APP_CODE_PATH_CONTAINER=/var/www
# You may add flags to the path `:cached`, `:delegated`. When using Docker Sync add `:nocopy`
APP_CODE_CONTAINER_FLAG=:cached
# Choose storage path on your machine. For all storage systems
DATA_PATH_HOST=~/.laradock/data