Skip to content

Instantly share code, notes, and snippets.

@redannick
Last active March 1, 2019 14:03
Show Gist options
  • Save redannick/828c6c7f93cc9f54ee2de045755fe37a to your computer and use it in GitHub Desktop.
Save redannick/828c6c7f93cc9f54ee2de045755fe37a to your computer and use it in GitHub Desktop.
Notes on how to get https://github.com/greenpeace/planet4-docker-compose up and running on windows using WSL.

Notes on how to get https://github.com/greenpeace/planet4-docker-compose up and running on windows using WSL.

  • Use windows 10 pro 1809+ and profressional with docker for windows

  • install latest ubuntu on WSL (18.04) from microsoft store

  • Update windows hosts file with paths: add:

127.0.0.1 www.planet4.test
127.0.0.1 pma.www.planet4.test
127.0.0.1 traefik.www.planet4.test

to C:\Windows\System32\drivers\etc\hosts (edit with admin rights)

sudo apt-get install git make docker.io docker-compose yarn curl gulp shellcheck yamllint jq golang-go socat unzip


	image: mysql:5.7
		env_file:
			- ./db.env
		volumes:
			- db:/var/lib/mysql
			- ./defaultcontent:/docker-entrypoint-initdb.d
		networks:
			- db
		labels:
		traefik.enable: "false"

should be updated to:

		image: mysql:5.7
		env_file:
			- ./db.env
		volumes:
			- db:/var/lib/mysql
			- /c/Users/robin/clients/outlandish/greenpeace/planet4-docker-compose/defaultcontent:/docker-entrypoint-initdb.d
		networks:
			- db
		labels:
		traefik.enable: "false"

These need updating on the db, php-fpm and openresty configs.

  • The unzipimages make task errors - add @mkdir -p persistence/app/public/wp-content/uploads before the unzip in Makefile

  • It may be that COMPOSE_CONVERT_WINDOWS_PATHS environment varialble might negate this change but I haven't got it to work. Nick Sellen suggested something like this: ${MOUNT_PREFIX:-}${PWD}/path/to/mount/source:/and/the/dest to make it work cross platform.

  • Sometimes make run (part of make build) fails and needs to be run a few times before all the docker images come up correctly. If this happens while running make build then you have to go through and run the remaining make tasks manually. Also can happen with make stop.

  • If make build gets stuck on the ......... it's worth cancelling and running make run again.

  • This all seems to work better on my more powerful workstation. On my less powerful laptop it can get bogged down with pipe errors through to docker and can all run fairly slowly. Once it's all running though it's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment