How to use with a Docker compose setup?
With a Docker compose file like below, how should I setup my export options?
version: '3.3' services: db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress volumes: db_data:
- 3 replies
- GGuillaume Moigneu @gmoigneu2019-02-20 10:48:11.876Z
Thank you for this answer.
However it would be more efficient to be able to define the base url that the crawler should use. The same way you are doing this with the port.
That way we could use whatever address we want to access WP and use
https://wordpressas the crawler target.
This will be useful when your
nginxcontainer is not the same as the
webserver: image: phpdockerio/nginx:latest container_name: bma-webserver working_dir: /application volumes: - .:/application - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf ports: - "1025:80" links: - php-fpm php-fpm: build: context: . dockerfile: phpdocker/php-fpm/Dockerfile container_name: bma-php-fpm working_dir: /application volumes: - .:/application - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php5/fpm/conf.d/99-overrides.ini
I'll try to work on a PR if that's ok for you.
- Leon Stafford @leonstafford2019-02-23 16:10:03.473Z
Sorry for the late response. Great idea. I've started sketching out a simpler way for the plugin to work.
If it's a small PR, by all means, I'd be super happy to receive it. At the moment, we're about to restructure quite a bit for version 7. If you can base your work off of the
developbranch and get it working, even if we diverge, I can re-apply if it gets messy.
There's quite a bit of "why does it do it like that?" in the plugin code at the moment, if you don't mind adventuring through that and manage to get a PR in, bon chance!
- In reply toleonstafford⬆:Leon Stafford @leonstafford2018-12-17 08:09:37.801Z
docker compose up, completing the WP setup and installing the WP2Static plugin, the following settings have been tested to work fine without any other configuration needed:
Depending on your site's theme, post and page URLs, you may need to adjust your Permalinks as below to get things working. This is an issue which should be resolved in a future version.