Skip to content

Commit fadd520

Browse files
committed
Code cleanup, Update docs.
1 parent f09e139 commit fadd520

3 files changed

Lines changed: 12 additions & 46 deletions

File tree

README.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,9 @@
44

55
2. Install docker (https://docs.docker.com/engine/installation/) and docker compose (https://docs.docker.com/compose/install/)
66

7-
3. Run in console "docker-compose up -d --build && sh run.sh".
7+
3. Run in console "docker-compose up -d".
88

99
4. chmod +x run.sh
10-
11-
4. Install Drupal:
12-
- Profile: `minimal`
13-
- DB user, Password, database name: `drupal`
14-
- Site information:
15-
- name: `panels_d8`
16-
- site email: `panels_d8@example.com`
17-
- SITE MAINTENANCE ACCOUNT:
18-
- user: `admin`
19-
- pass: `admin`
20-
- email: `panels_d8@example.com`
2110

2211
## Links:
2312
Site will available on host: http://panels_d8.docker.localhost:8877 or http://localhost:2877
@@ -26,9 +15,10 @@ Phpmyadmin available on host: http://pma.panels_d8.docker.localhost:8877 or htt
2615

2716
Access to admin side - `admin`:`admin`
2817

29-
## Container access:
30-
`$ docker-compose exec php cd cd web/ drush cr`
31-
`$ docker-compose exec -it bash`
18+
## Container access examples:
19+
`$ docker-compose exec php drush cr`
20+
`$ docker-compose exec php bash`
21+
`$ docker-compose exec php drush en ctools -y`
3222

3323
## Mac Users
3424
To fix Docker poor performance on macOS use the following workaround based on docker-sync project. The core idea is to replace a standard slow volume with a file synchronizer tool.

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ services:
3838
PHP_XDEBUG_REMOTE_CONNECT_BACK: 0 # This is needed to respect remote.host setting bellow
3939
PHP_XDEBUG_REMOTE_HOST: "10.254.254.254" # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
4040
volumes:
41-
# - ./docroot/:/var/www/html
42-
- codebase:/var/www/html
41+
- ./docroot/:/var/www/html
42+
# - codebase:/var/www/html
4343

4444
nginx:
4545
# wodby/drupal-nginx:[DRUPAL_VERSION]-[NGINX_VERSION]-[STABILITY_TAG].
@@ -55,8 +55,8 @@ services:
5555
NGINX_BACKEND_HOST: php
5656
NGINX_SERVER_ROOT: /var/www/html
5757
volumes:
58-
# - ./docroot/:/var/www/html
59-
- codebase:/var/www/html
58+
- ./docroot/:/var/www/html
59+
# - codebase:/var/www/html
6060
labels:
6161
- 'traefik.backend=nginx'
6262
- 'traefik.port=80'
@@ -142,6 +142,6 @@ services:
142142
volumes:
143143
- /var/run/docker.sock:/var/run/docker.sock
144144

145-
volumes:
146-
codebase:
147-
external: true
145+
#volumes:
146+
# codebase:
147+
# external: true

run.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,10 @@
22

33
DRUPAL_VERSION=8.3.2
44

5-
result=${PWD##*/}
6-
result=$(echo $result | tr -d "[-_]-")
7-
result=$(echo $result | tr '[:upper:]' '[:lower:]')
8-
containerName=$result"_php_1"
9-
dockerContainerId=$(docker ps -aqf "name=$containerName")
10-
115
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o docroot/drupal.tar.gz
126
cd docroot/
137
chmod 777 drupal.tar.gz
148
tar -xz --strip-components=1 -f drupal.tar.gz
159
rm drupal.tar.gz
1610
mkdir -p sites/default/files/tmp sites/default/files/private sites/default/config/sync
1711
cp ../templates/settings.php.tpl ../docroot/sites/default/settings.php
18-
19-
#docker exec -it $dockerContainerId curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz
20-
21-
#docker exec -it $dockerContainerId chmod 777 drupal.tar.gz
22-
#docker exec -it $dockerContainerId tar -xz --strip-components=1 -f drupal.tar.gz
23-
#docker exec -it $dockerContainerId rm drupal.tar.gz
24-
#docker exec -it $dockerContainerId mkdir -p sites/default/files/tmp sites/default/files/private
25-
#docker exec -it $dockerContainerId cp /var/www/tmp/settings.php /var/www/html/sites/default/
26-
#docker exec -it $dockerContainerId chmod 777 -R ./
27-
#docker exec -it $dockerContainerId chown www-data:www-data -R ./
28-
29-
30-
#docker exec -it $dockerContainerId drush dl ctools-8.x-3.0-alpha27 --destination=modules/contrib -y
31-
#docker exec -it $dockerContainerId drush dl layout_plugin-8.x-1.0-alpha23 --destination=modules/contrib -y
32-
#docker exec -it $dockerContainerId drush dl page_manager-8.x-1.0-alpha24 --destination=modules/contrib -y
33-
#docker exec -it $dockerContainerId drush dl panels-8.x-3.0-beta5 --destination=modules/contrib -y
34-
#docker exec -it $dockerContainerId chmod 777 -R ./
35-
#docker exec -it $dockerContainerId drush en ctools layout_plugin page_manager page_manager_ui panels -y

0 commit comments

Comments
 (0)