Dreamhost to Docker Swarm and a site move
Whats up all…. It has been a while.
the pandemic happened.
and i moved this site from dreamhost to a docker swarm setup (i will go over that setup in a later post)…
while configuring the compose file i decided that i should post it and also to explain that this version of the site was brought up fresh without a mysql backup / restore but rather i used the wordpress export / import tools to move stuff.
here is the docker compose i used :
version: "3" services: wordpress: hostname: wordpress image: wordpress container_name: wordpress deploy: mode: global resources: limits: cpus: "2" memory: 512M reservations: memory: 256M ports: - 8080:80 environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: wp_user WORDPRESS_DB_PASSWORD: wp_pass WORDPRESS_DB_NAME: wordpress volumes: - "/path_to/wordpress:/var/www/html" db: hostname: mysql image: mysql container_name: mysql deploy: resources: limits: cpus: "2" memory: 1024M reservations: memory: 256M environment: MYSQL_DATABASE: wordpress MYSQL_USER: wp_user MYSQL_PASSWORD: wp_pass MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - "/path_to/mysql:/var/lib/mysql"
a few things to note :
– this is in docker swarm so hence the deploy section
– since this is swarm i decided to run the wordpress section itself in global
– the resource amounts chosen are still being graphed and tuned so YMMV
– i am using portainer to manage the docker installs
hopefully, with some testing and some more work i will get back to regularly posting and yelling into the void.