Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
merged PR #41 et #42
Browse files Browse the repository at this point in the history
  • Loading branch information
ebreton committed Oct 9, 2017
2 parents 3c025e1 + 0084e08 commit 3a38dac
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ before_install:

install:
- make up
- docker exec mgmt make -C /srv/$WP_ENV/jahia2wp bootstrap-mgmt
# On searching containers by labels, see
# https://docs.docker.com/engine/reference/commandline/ps/#filtering
# The labels introduced by docker-compose don't seem to be documented
# anywhere, but you can list them with "docker inspect". The closest
# we have to something official would be this pull request's comment:
# https://github.com/docker/compose/pull/1356#issuecomment-99801372
- docker exec $(docker ps -q --filter "label=com.docker.compose.service=mgmt") make -C /srv/$WP_ENV/jahia2wp bootstrap-mgmt

script:
- ci_env=`bash <(curl -s https://codecov.io/env)`
- docker exec --user=www-data $ci_env mgmt make -C /srv/$WP_ENV/jahia2wp test-travis
- docker exec --user=www-data $ci_env $(docker ps -q --filter "label=com.docker.compose.service=mgmt") make -C /srv/$WP_ENV/jahia2wp test-travis
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ else
include .env
endif

_mgmt_container = $(shell docker ps -q --filter "label=ch.epfl.jahia2wp.mgmt.env=${WP_ENV}")

test: check-env
# The "test-raw" target is in Makefile.mgmt
docker exec --user=www-data mgmt make -C /srv/$$WP_ENV/jahia2wp test-raw
docker exec --user=www-data $(_mgmt_container) make -C /srv/$$WP_ENV/jahia2wp test-raw

vars: check-env
@echo 'Environment-related vars:'
Expand Down Expand Up @@ -48,7 +50,7 @@ exec: check-env
-e WP_ENV=${WP_ENV} \
-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} \
-e MYSQL_DB_HOST=${MYSQL_DB_HOST} \
mgmt bash -l
$(_mgmt_container) bash -l

down: check-env
@WP_PORT_HTTP=${WP_PORT_HTTP} \
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ Simply run the instructions given in the last lines from the script.

Among them, `make exec` will log you in your container: you are now ready to jump to the next section, about [usages](#usage).

💡 If you want to use a nonstandard HTTP or HTTP/S port, you will need to [log in through phpMyAdmin](#phpmyadmin-locally) to [edit](https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database) `siteurl` in table `wp_options`, **prior to** testing your new site in the browser (or [clear the cache](https://stackoverflow.com/a/46632349/435004) if you forgot)

Did we mention that would you be looking for a more explicit process, feel free to follow the [detailed guide](./docs/INSTALL_DETAILED.md)? ;)

### Express setup (C2C)
Expand Down Expand Up @@ -194,7 +196,7 @@ To get the version of a given wordpress:

To get the admin users of a given wordpress

.../src$ python jahia2wp.py clean-one $WP_ENV http://localhost/folder/
.../src$ python jahia2wp.py wp-admins $WP_ENV http://localhost/folder/
admin:[email protected] <administrator>
user235151:[email protected] <administrator>

Expand Down
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: '3'
services:

db:
container_name: db
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
Expand All @@ -12,7 +11,6 @@ services:

phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
ports:
Expand All @@ -21,7 +19,6 @@ services:
- /sessions

httpd:
container_name: httpd
image: camptocamp/os-wp-httpd
volumes:
- ./volumes/srv:/srv
Expand All @@ -34,7 +31,8 @@ services:
- "${WP_PORT_HTTPS}:443"

mgmt:
container_name: mgmt
labels:
ch.epfl.jahia2wp.mgmt.env: ${WP_ENV}
image: camptocamp/os-wp-mgmt
env_file:
- .env
Expand Down
Binary file modified docs/static/archi_infra_C2C.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/archi_local.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a38dac

Please sign in to comment.