Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP:MacOS shared folder config + cached option #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ PHP_VERSION=7
IMAGE_PHP=skilldlabs/php:71-fpm
IMAGE_FRONT=skilldlabs/frontend:zen
DB_URL=sqlite:///dev/shm/d8.sqlite
MYSQL_DATA_DIR=/dev/shm
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $(error Project name can not be default, please edit ".env" and set COMPOSE_PROJ
endif

prepare:
mkdir -p /dev/shm/${COMPOSE_PROJECT_NAME}_mysql
mkdir -p ${MYSQL_DATA_DIR}/${COMPOSE_PROJECT_NAME}_mysql
make -s down
make -s up
$(call php-0, apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community git)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ For Linux install <a href="https://docs.docker.com/compose/install/" target="_bl

5\. Run `make`

Additional steps for MacOS install: (https://docs.docker.com/docker-for-mac/osxfs-caching/)

2\.3\. Set MYSQL_DATA_DIR variable to any writable absolute path instead of /dev/shm (PROJECT_PATH/sql for example)

3\. Copy __docker-compose\.override\.yml\.default_mac__ to __docker-compose\.override\.yml__

## Usage

* `make` - Install project.
Expand Down
44 changes: 44 additions & 0 deletions docker/docker-compose.override.yml.default_mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: "2"

services:

# Override base service.
php:
volumes:
- ../../build:/var/www/html:cached
- ../${PROFILE_NAME}:/var/www/html/profiles/${PROFILE_NAME}:cached
- ../modules:/var/www/html/modules/custom:cached
- ../themes:/var/www/html/themes/custom:cached
- "./90-mail.ini:/etc/php${PHP_VERSION}/conf.d/90-mail.ini:cached"
- ../../config/sync:/var/www/html/sync:cached
# Uncomment next line if you need PHP XDebug.
# command: php-fpm7 -F -d zend_extension=xdebug.so

# adminer:
# image: dockette/adminer:mysql-php7
# container_name: "${COMPOSE_PROJECT_NAME}_adminer"
# links:
# - mysql:mysql
# depends_on:
# - mysql
# networks:
# - front

mailhog:
image: skilldlabs/mailhog
container_name: "${COMPOSE_PROJECT_NAME}_mail"
restart: always
networks:
- front

mysql:
volumes:
- ${MYSQL_DATA_DIR}/${COMPOSE_PROJECT_NAME}_mysql:/var/lib/mysql:cached


nginx:
ports:
- "8086:80"
# Mount local folder with ssl keys.
# volumes:
# - ./nginx/ssl:/etc/nginx/ssl:Z