These files is a base structure for ProcessWire projects using Docker.
This is a testing environment docker configuration tailored for ProcessWire. If you want to use it in production you must properly check security and other configurations.
For starting the project use
$ docker-compose up -d
A new Apache
and MariaDB
instance will start.
Configure your ProcessWire
files in pw
directory. You can copy
files from a existing project or install a fresh copy.
Use these credentials in ProcessWire
configuration.
- user:
docker
- password :
docker
- database :
docker
- host :
db
(You could also use just the ip) - port
3306
For accesing db using an external tool like Sequel Pro or HeidiSQL.
- user:
docker
- password :
docker
- database :
docker
- host :
127.0.0.1
- port
3306
Always backup your database sql because you may loose your data if you prune your containers.
This issues may ocur if the docker container was incorrectly stopped or pruned and restarted.
When starting database could fail. Delete the file tc.log
.
When importing sql may show Error : Tablespace for table xxxx exists. Please DISCARD the tablespace before IMPORT.
. Search for *.idb
files without it's matching *.frm
file. Move those idb
files to another directory or delete them.
For changing PHP settings go to docker/processwire/init.sh
and then rebuild
the containers. For installing additional modules change the docker/processwire/Dockerfile
.
- Default timezone America/Santiago.
Once Docker
is running you can access ProcessWire
by going to localhost
in your browser. 127.0.0.1
. Is recommended that you edit your hosts
file
to add a custom domain.
If you want to use another port (default is 80) you must change it in the docker-compose.yaml
file.
ports:
# local port : docker port
- 80:80
docker-compose up -d
: Starts the containersdocker ps
: Show the running containersdocker kill <container id>
: Kills a containerdocker network prune
: Reset the networkdocker container prune
: Resets the stopped containers
A Makefile is a way of simplifyng some tasks.
make download-pw
: Will download the latest version of pw (requires git).make docker-up
: Will create some dirs and execute docker-compose up.make install
: Will executedownload-pw
and thendocker-up
.
-
https://processwire.com/talk/topic/10736-running-a-processwire-site-with-docker/
-
https://github.com/undernewmanagement/processwire-docker-compose
Made with ♥ by Ninjas.cl.