|
|
před 5 roky | |
|---|---|---|
| configs | před 5 roky | |
| plugins | před 5 roky | |
| vue-theme | před 5 roky | |
| .gitignore | před 6 roky | |
| README.md | před 6 roky | |
| docker-compose.yml | před 5 roky | |
| uploads.ini | před 6 roky |
Docker + Wordpress for SPEED
rsync -av <user>@<host>:/opt/vue-wp/uploads/ <local directory>docker commit -p d3346eb32de0 <snapshot_name>docker save -o ~/<snapshot_name>.tar <snapshot_name>rsync -av <user>@<host>:/home/<user>/<snapshot_name> <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 craft-vuedocker-compose up -dcd cia-vue-themenpm installnpm run dev, then check http://localhost:8081main_nav, footer, and sub_nav_<insert-custom-type-here>/%postname%/ in the text fieldNow that your pipeline is in place, you can start writing your application. Start by modifying the entry point main.js and creating new .js files to store your other modules (which you’ll import from main.js).
A really great library to quickly prototype is Vue.js.
In the src folder there will already be a base HTML page. Any other assets can be put in src or just create subfolders where you will import from (E.G. styles, scripts, assets, fonts, images, etc.). The structure is up to you.
Search for packages:
npm search <query>
Install packages (for production dependencies like d3, three.js, etc.):
npm install <package> --save
Install packages(for dev dependencies like Jasmin, Protractor, etc.)
npm install <package> --save-dev
npm uninstall <package>When you get ready to deploy your app to an actual server, run npm run build and things get compressed and tidied up into a public directory. 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