Guest User

Untitled

a guest
Jan 9th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. version: "2.3"
  2. services:
  3. db:
  4. image: mysql:5.7
  5. volumes:
  6. - db_data:/var/lib/mysql
  7. restart: always
  8. environment:
  9. MYSQL_ROOT_PASSWORD: somewordpress
  10. MYSQL_DATABASE: wordpress
  11. MYSQL_USER: wordpress
  12. MYSQL_PASSWORD: wordpress
  13.  
  14. wordpress:
  15. depends_on:
  16. - db
  17. image: wordpress:latest
  18. ports:
  19. - 8000:80
  20. restart: always
  21. environment:
  22. WORDPRESS_DB_HOST: db:3306
  23. WORDPRESS_DB_NAME: wordpress
  24. WORDPRESS_DB_USER: wordpress
  25. WORDPRESS_DB_PASSWORD: wordpress
  26. WORDPRESS_TABLE_PREFIX: "wp_"
  27. WORDPRESS_DEBUG: 1
  28. # vstm: add shared volume
  29. volumes:
  30. - wp_data:/var/www/html
  31. - ./default/:/var/www/html/wp-content/themes/default
  32.  
  33. wordpress-cli:
  34. depends_on:
  35. - db
  36. - wordpress
  37. image: wordpress:cli
  38. # vstm: This is required to run wordpress-cli with the same
  39. # user-id as wordpress. This way there are no permission problems
  40. # when running the cli
  41. user: xfs
  42. # vstm: The sleep 10 is required so that the command is run after
  43. # mysql is initialized. Depending on your machine this might take
  44. # longer or it can go faster.
  45. command: >
  46. /bin/bash -c '
  47. sleep 10;
  48. wp core install --path="/var/www/html" --url="http://localhost:8000" --title="Local Wordpress By Docker" --admin_user=admin --admin_password=secret --admin_email=foo@bar.com;
  49. wp plugin install classic-editor;
  50. '
  51. # vstm: add shared volume
  52. volumes:
  53. - wp_data:/var/www/html
  54. - ./default/:/var/www/html/wp-content/themes/default
  55.  
  56. volumes:
  57. db_data:
  58. # vstm: add shared volume
  59. wp_data:
  60.  
  61. Warning: Unable to create directory wp-content/uploads/2019/01. Is its parent directory writable by the server?
  62. Success: WordPress installed successfully.
  63. Installing Classic Editor (1.3)
  64. Warning: Failed to create directory '/etc/X11/fs/.wp-cli/cache/': mkdir(): Permission denied.
  65. Downloading installation package from https://downloads.wordpress.org/plugin/classic-editor.1.3.zip...
  66. Unpacking the package...
  67. Warning: Could not create directory.
  68. Error: No plugins installed.
Add Comment
Please, Sign In to add comment