|
|
5 anni fa | |
|---|---|---|
| configs | 5 anni fa | |
| deployment | 5 anni fa | |
| plugins | 5 anni fa | |
| vue-theme | 5 anni fa | |
| .drone.yml | 5 anni fa | |
| .gitignore | 5 anni fa | |
| README.md | 5 anni fa | |
| adminer.ini | 5 anni fa | |
| docker-compose.yml | 5 anni fa | |
| sample.env | 5 anni fa | |
| uploads.ini | 6 anni fa |
Docker + Wordpress for SPEED
rsync -av <user>@<host>:/opt/vue-wp/uploads/ <local directory>
docker-compose exec -T craft-db mysqldump -u root -p current_cia | gzip > /home/<user_name>/backups/"`date +"%Y-%m-%d"`"-craftdb-backup.sql.gz
rsync -av <user>@<host>:/home/<user>/<date>-craftdb-backup.sql.gz <local directory>brew install node using Homebrewapt install nodejs (see Ubuntu/Debian specific instructions) or pacman -S nodejs (Arch Linux)git clone ssh://git@gitea.yvvas.com:4022/craft-in-america/vue-wp.gitcd vue-wpdocker-compose up -dcd vue-themenpm installnpm run dev, then check http://localhost:8081main_nav, footer, and sub_nav_<insert-custom-type-here>/%postname%/ in the text fieldSetup a staging server and initialize a bare git repo in the /opt directoru
git init --bare /opt/vue-wp.git
Copy over the post-receive script from ./deployment to /opt/vue-wp.git/hooks and make it executable with the command chmod ug+x /opt/vue-wp.git/hooks/post-receive
On your development machine, add the staging server as a remote…
git remote add staging <user>@<server_ip>:/opt/staging/vue-wp.git
When you get ready to deploy your app to an actual server, run git push && git push staging and things will get pulled and built on the staging server. Sweet!
Currently the API uses localhost. This should be changed in production.
Set your passwords in the .env file like so..
DB_PASSWORD=<changeme>
WORDPRESS_DB_USER=root
IS_DEV=false
Lastly set your directory owner to www-data with docker exec -it vue-wp chown -R www-data:www-data ./wp-content
Included is a drone config, and some recommended steps to build.
id_rsa of the drone host to appropriate key in the pipeline secrets under the name push_deploy_keyYou also need to setup a post-receive hook on the host server.
git remote add </opt/staging/js-vue.git> staging mastergit init --bare </opt/staging/js-vue.git>post-receive hook file into the </opt/staging/js-vue.git/hooks/> directory