├── .gitlab-ci.yml ├── LICENSE ├── README.md ├── docker-compose.yml ├── nginx ├── Dockerfile └── default.conf ├── nuxt ├── Dockerfile ├── LICENSE ├── README.md ├── assets │ └── README.md ├── components │ ├── AppLogo.vue │ ├── Blog.vue │ ├── BlogPost.vue │ ├── Header.vue │ ├── Menu.vue │ └── README.md ├── helpers │ ├── getByPath.js │ └── index.js ├── layouts │ ├── README.md │ ├── default.vue │ └── error.vue ├── middleware │ └── README.md ├── nuxt.config.js ├── package.json ├── pages │ ├── README.md │ ├── _page.vue │ ├── blog │ │ ├── _post.vue │ │ └── index.vue │ └── index.vue ├── plugins │ └── README.md ├── static │ ├── README.md │ └── favicon.ico ├── store │ ├── README.md │ └── index.js └── test │ └── index.test.js └── wordpress ├── Dockerfile ├── cmd.sh ├── plugins └── README.md └── uploads.ini /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - deploy 3 | 4 | services: 5 | - docker:dind 6 | 7 | image: docker 8 | 9 | before_script: 10 | - apk add --update py-pip 11 | - pip install docker-compose 12 | 13 | deploy: 14 | stage: deploy 15 | script: 16 | - mkdir $DOCKER_CERT_PATH 17 | - echo "$CA" > $DOCKER_CERT_PATH/ca.pem 18 | - echo "$CLIENT_CERT" > $DOCKER_CERT_PATH/cert.pem 19 | - echo "$CLIENT_KEY" > $DOCKER_CERT_PATH/key.pem 20 | - docker-compose build 21 | - docker-compose up -d 22 | - rm -rf $DOCKER_CERT_PATH 23 | only: 24 | - master 25 | variables: 26 | DOCKER_TLS_VERIFY: "1" 27 | DOCKER_HOST: "tcp://[YOUR_HOST_IP_HERE]:2376" 28 | DOCKER_CERT_PATH: "certs" 29 | tags: 30 | - docker 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Nikita Makhov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nuxt-wp-docker 2 | Docker-compose for Wordpress (REST API) and Nuxt.js 3 | 4 |  5 | 6 | ## Local install 7 | 8 | 1) clone this repo 9 | 2) cd to folder with repo 10 | 3) docker-compose up -d 11 | 4) open `localhost:5000/wp-admin/` and install wordpress 12 | 5) open `localhost:5000/wp-admin/options-permalink.php` and update permalink to human readable like `/posts/%postname%` 13 | 6) make two new pages with slug `main` and `blog` 14 | 7) open localhost:5000 15 | 16 |  17 | 18 | ## Development 19 | 20 | You can debug your Nuxt app with famous [vue-devtools](https://github.com/vuejs/vue-devtools). It's all ready. 21 | 22 |  23 | 24 | ## Production 25 | 26 | To build production version of Nuxt open `docker-composer.yml`, find `nuxt` section and in `command` change to `npm run start` like this: 27 | 28 | ``` 29 | nuxt: 30 | build: ./nuxt 31 | depends_on: 32 | - wp 33 | - db 34 | networks: 35 | - flat-network 36 | restart: always 37 | command: 38 | "npm run start" 39 | ``` 40 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | nginx: 4 | build: ./nginx 5 | ports: 6 | - "5000:80" 7 | depends_on: 8 | - nuxt 9 | - wp 10 | networks: 11 | - flat-network 12 | nuxt: 13 | build: ./nuxt 14 | depends_on: 15 | - wp 16 | - db 17 | networks: 18 | - flat-network 19 | restart: always 20 | command: 21 | "npm run dev" 22 | wp: 23 | build: ./wordpress 24 | volumes: 25 | - ./wordpress/plugins:/app/wordpress/wp-content/plugins 26 | depends_on: 27 | - db 28 | environment: 29 | WORDPRESS_DB_HOST: db:3306 30 | WORDPRESS_DB_USER: wordpress 31 | WORDPRESS_DB_PASSWORD: wordpress 32 | WORDPRESS_DB_NAME: wordpress 33 | networks: 34 | - flat-network 35 | db: 36 | image: mysql:5.7 37 | volumes: 38 | - ./db_data:/var/lib/mysql 39 | restart: always 40 | environment: 41 | MYSQL_ROOT_PASSWORD: somewordpress 42 | MYSQL_DATABASE: wordpress 43 | MYSQL_USER: wordpress 44 | MYSQL_PASSWORD: wordpress 45 | networks: 46 | - flat-network 47 | 48 | networks: 49 | flat-network: 50 | 51 | volumes: 52 | db_data: 53 | -------------------------------------------------------------------------------- /nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | COPY default.conf /etc/nginx/conf.d/ -------------------------------------------------------------------------------- /nginx/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | client_max_body_size 64M; 6 | 7 | location ~ ^/wp([a-z-_*]) { 8 | proxy_pass http://wp:8080; 9 | proxy_set_header Host $http_host; 10 | proxy_set_header X-Real-IP $remote_addr; 11 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 12 | proxy_set_header X-Forwarded-Proto $scheme; 13 | } 14 | 15 | location / { 16 | proxy_pass http://nuxt:3000; 17 | proxy_set_header Host $http_host; 18 | proxy_set_header X-Real-IP $remote_addr; 19 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 20 | proxy_set_header X-Forwarded-Proto $scheme; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /nuxt/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10.7 2 | 3 | ENV APP_ROOT /src 4 | ENV HOST 0.0.0.0 5 | 6 | WORKDIR ${APP_ROOT} 7 | ADD . ${APP_ROOT} 8 | RUN npm install && npm run build -------------------------------------------------------------------------------- /nuxt/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Nikita Makhov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /nuxt/README.md: -------------------------------------------------------------------------------- 1 | # vue-wordpress 2 | 3 | > Vue + Wordpress project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | $ npm install # Or yarn install 10 | 11 | # serve with hot reload at localhost:3000 12 | $ npm run dev 13 | 14 | # build for production and launch server 15 | $ npm run build 16 | $ npm start 17 | 18 | # generate static project 19 | $ npm run generate 20 | ``` 21 | 22 | For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js). 23 | 24 | -------------------------------------------------------------------------------- /nuxt/assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/assets#webpacked 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | 10 | -------------------------------------------------------------------------------- /nuxt/components/AppLogo.vue: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 95 | 96 | -------------------------------------------------------------------------------- /nuxt/components/Blog.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /nuxt/components/BlogPost.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ post.title.rendered }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 26 | 27 | -------------------------------------------------------------------------------- /nuxt/components/Header.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 39 | 40 | 47 | -------------------------------------------------------------------------------- /nuxt/components/Menu.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ item.text }} 5 | 6 | 7 | 8 | 9 | 17 | 18 | 45 | -------------------------------------------------------------------------------- /nuxt/components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | The components directory contains your Vue.js Components. 4 | Nuxt.js doesn't supercharge these components. 5 | 6 | **This directory is not required, you can delete it if you don't want to use it.** 7 | 8 | -------------------------------------------------------------------------------- /nuxt/helpers/getByPath.js: -------------------------------------------------------------------------------- 1 | const getByPath = function (path, obj) { 2 | return (new String(path)).split('.').reduce((res, prop) => { 3 | return res && res[prop]; 4 | }, obj); 5 | } 6 | 7 | export default getByPath; 8 | -------------------------------------------------------------------------------- /nuxt/helpers/index.js: -------------------------------------------------------------------------------- 1 | import getByPath from './getByPath'; 2 | 3 | export { 4 | getByPath 5 | } -------------------------------------------------------------------------------- /nuxt/layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | This directory contains your Application Layouts. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/views#layouts 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | 10 | -------------------------------------------------------------------------------- /nuxt/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 69 | 70 | -------------------------------------------------------------------------------- /nuxt/layouts/error.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ooops, page not found 6 | May be you've mistaken in address, please try our beautiful menu in header 7 | 8 | 9 | We've encountered a mistake 10 | We're working on it, try again later 11 | 12 | 13 | 14 | 15 | 16 | 23 | -------------------------------------------------------------------------------- /nuxt/middleware/README.md: -------------------------------------------------------------------------------- 1 | # MIDDLEWARE 2 | 3 | This directory contains your Application Middleware. 4 | The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts). 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing#middleware 8 | 9 | **This directory is not required, you can delete it if you don't want to use it.** 10 | 11 | -------------------------------------------------------------------------------- /nuxt/nuxt.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /* 3 | ** Headers of the page 4 | */ 5 | head: { 6 | title: 'vue-wordpress', 7 | meta: [ 8 | { charset: 'utf-8' }, 9 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 10 | { hid: 'description', name: 'description', content: 'Vue + Wordpress project' } 11 | ], 12 | link: [ 13 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } 14 | ] 15 | }, 16 | /* 17 | ** Customize the progress bar color 18 | */ 19 | loading: { color: '#3B8070' }, 20 | /* 21 | ** Build configuration 22 | */ 23 | build: { 24 | postcss: { 25 | plugins: { 26 | 'postcss-nested': {} 27 | }, 28 | preset: { 29 | features: { 30 | 'nesting-rules': true 31 | } 32 | } 33 | }, 34 | extractCSS: true, 35 | extend: (config) => { 36 | const svgRule = config.module.rules.find(rule => rule.test.test('.svg')); 37 | 38 | svgRule.test = /\.(png|jpe?g|gif)$/; 39 | 40 | config.module.rules.push({ 41 | test: /\.svg$/, 42 | oneOf: [ 43 | { 44 | resourceQuery: /inline/, 45 | loader: 'vue-svg-loader', 46 | }, 47 | { 48 | loader: 'file-loader', 49 | query: { 50 | name: 'assets/[name].[hash:8].[ext]', 51 | }, 52 | }, 53 | ], 54 | }); 55 | }, 56 | /* 57 | ** Run ESLint on save 58 | */ 59 | /* extend (config, { isDev, isClient }) { 60 | if (isDev && isClient) { 61 | config.module.rules.push({ 62 | enforce: 'pre', 63 | test: /\.(js|vue)$/, 64 | loader: 'eslint-loader', 65 | exclude: /(node_modules)/ 66 | }) 67 | } 68 | } */ 69 | }, 70 | modules: [ 71 | '@nuxtjs/axios', 72 | ], 73 | axios: { 74 | baseURL: 'http://wp:8080', 75 | browserBaseURL: process.env.NODE_ENV === 'development' ? 'http://localhost:5000' : 'http://[YOUR_HOST_IP_OR_DOMAIN]:5000' 76 | }, 77 | sentry: { 78 | public_key: 'YOUR_PUBLIC_KEY', 79 | project_id: 'YOUR_PROJECT_ID', 80 | config: { 81 | // Additional config 82 | }, 83 | }, 84 | } 85 | 86 | -------------------------------------------------------------------------------- /nuxt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-wordpress", 3 | "version": "1.1.0", 4 | "description": "Vue + Wordpress project", 5 | "author": "Defite ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "NODE_ENV=development nuxt", 9 | "build": "NODE_ENV=production nuxt build", 10 | "start": "NODE_ENV=production nuxt start", 11 | "generate": "nuxt generate", 12 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", 13 | "precommit": "npm run lint", 14 | "test": "ava" 15 | }, 16 | "dependencies": { 17 | "@nuxtjs/axios": "^5.3.1", 18 | "@nuxtjs/sentry": "^2.0.0", 19 | "nuxt": "^2.0.0", 20 | "vue-svg-loader": "^0.10.0", 21 | "postcss-nested": "^4.1.0" 22 | }, 23 | "devDependencies": { 24 | "ava": "^0.25.0", 25 | "babel-eslint": "^10.0.1", 26 | "eslint": "^5.6.1", 27 | "eslint-friendly-formatter": "^3.0.0", 28 | "eslint-loader": "^2.1.1", 29 | "eslint-plugin-vue": "^4.0.0", 30 | "jsdom": "^12.0.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /nuxt/pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the .vue files inside this directory and creates the router of your application. 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing 8 | 9 | -------------------------------------------------------------------------------- /nuxt/pages/_page.vue: -------------------------------------------------------------------------------- 1 | /** 2 | * Common page 3 | * @slug: { slug } 4 | */ 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 35 | -------------------------------------------------------------------------------- /nuxt/pages/blog/_post.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 36 | 37 | -------------------------------------------------------------------------------- /nuxt/pages/blog/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 51 | 52 | -------------------------------------------------------------------------------- /nuxt/pages/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 34 | 35 | 40 | 41 | -------------------------------------------------------------------------------- /nuxt/plugins/README.md: -------------------------------------------------------------------------------- 1 | # PLUGINS 2 | 3 | This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/plugins 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | 10 | -------------------------------------------------------------------------------- /nuxt/static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | This directory contains your static files. 4 | Each file inside this directory is mapped to /. 5 | 6 | Example: /static/robots.txt is mapped as /robots.txt. 7 | 8 | More information about the usage of this directory in the documentation: 9 | https://nuxtjs.org/guide/assets#static 10 | 11 | **This directory is not required, you can delete it if you don't want to use it.** 12 | 13 | -------------------------------------------------------------------------------- /nuxt/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defite/nuxt-wp-docker/ea2db29cfaf45552c522f9c46842a67dcb516912/nuxt/static/favicon.ico -------------------------------------------------------------------------------- /nuxt/store/README.md: -------------------------------------------------------------------------------- 1 | # STORE 2 | 3 | This directory contains your Vuex Store files. 4 | Vuex Store option is implemented in the Nuxt.js framework. 5 | Creating a index.js file in this directory activate the option in the framework automatically. 6 | 7 | More information about the usage of this directory in the documentation: 8 | https://nuxtjs.org/guide/vuex-store 9 | 10 | **This directory is not required, you can delete it if you don't want to use it.** 11 | 12 | -------------------------------------------------------------------------------- /nuxt/store/index.js: -------------------------------------------------------------------------------- 1 | import Vuex from 'vuex' 2 | 3 | const store = () => new Vuex.Store({ 4 | 5 | actions: { 6 | async nuxtServerInit ({ commit, state }) { 7 | let meta = await this.$axios.get('/wp-json/wp/v2') 8 | commit('setMeta', meta.data) 9 | } 10 | }, 11 | 12 | state: { 13 | post: null, 14 | posts: [], 15 | page: null, 16 | blog: null, 17 | indexInfiniteLoading: { 18 | enabled: true, 19 | page: 1 20 | }, 21 | meta: { 22 | description: '', 23 | name: '' 24 | } 25 | }, 26 | 27 | mutations: { 28 | setPost (state, data) { 29 | state.post = data 30 | }, 31 | setPosts (state, data) { 32 | state.posts = state.posts.concat(data) 33 | }, 34 | setBlogPage (state, data) { 35 | state.blog = data 36 | }, 37 | setPage (state, data) { 38 | state.page = data 39 | }, 40 | setIndexInfiniteLoading (state, data) { 41 | state.indexInfiniteLoading = data 42 | }, 43 | setMeta (state, data) { 44 | state.meta = data 45 | } 46 | } 47 | }) 48 | 49 | export default store -------------------------------------------------------------------------------- /nuxt/test/index.test.js: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import { Nuxt, Builder } from 'nuxt' 3 | import { resolve } from 'path' 4 | 5 | let nuxt = null; 6 | 7 | // Init Nuxt.js и create server on localhost:4000 8 | test.before('Init Nuxt.js', async t => { 9 | const rootDir = resolve(__dirname, '..') 10 | let config = {} 11 | try { config = require(resolve(rootDir, 'nuxt.config.js')) } catch (e) {} 12 | config.rootDir = rootDir // project folder 13 | config.dev = false // final build 14 | nuxt = new Nuxt(config) 15 | await new Builder(nuxt).build() 16 | nuxt.listen(4000, 'localhost') 17 | }); 18 | 19 | // Пример генерации html-кода только для этого теста 20 | test('Route / exits and render HTML', async t => { 21 | let context = {} 22 | const { html } = await nuxt.renderRoute('/', context) 23 | t.true(html.includes('Hello world!')) 24 | }); 25 | 26 | // Пример тестирования с помощью проверки DOM 27 | test('Route / exits and render HTML with CSS applied', async t => { 28 | const window = await nuxt.renderAndGetWindow('http://localhost:4000/') 29 | const element = window.document.querySelector('.red') 30 | t.not(element, null) 31 | t.is(element.textContent, 'Hello world!') 32 | t.is(element.className, 'red') 33 | t.is(window.getComputedStyle(element).color, 'red') 34 | }); 35 | 36 | // Остановить сервер и попросить nuxt не отслеживать изменения файлов 37 | test.after('Closing server and nuxt.js', t => { 38 | nuxt.close() 39 | }); -------------------------------------------------------------------------------- /wordpress/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM wordpress:php7.2-fpm-alpine 2 | 3 | RUN apk add --no-cache curl tar \ 4 | && mkdir -p /app \ 5 | && curl -o wordpress.tar.gz https://wordpress.org/latest.tar.gz \ 6 | && tar -zxf wordpress.tar.gz -C /app/ \ 7 | && rm -rf wordpress.tar.gz \ 8 | && mv /app/wordpress/wp-config-sample.php /app/wordpress/wp-config.php 9 | 10 | COPY cmd.sh /usr/local/bin/ 11 | COPY uploads.ini /usr/local/etc/php/conf.d/uploads.ini 12 | ADD plugins /app/wordpress/wp-content/plugins 13 | CMD ["cmd.sh"] 14 | -------------------------------------------------------------------------------- /wordpress/cmd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Wordpress config stuff 4 | cd /app/wordpress 5 | sed -i -e "s/database_name_here/$WORDPRESS_DB_NAME/" wp-config.php 6 | sed -i -e "s/username_here/$WORDPRESS_DB_USER/" wp-config.php 7 | sed -i -e "s/password_here/$WORDPRESS_DB_PASSWORD/" wp-config.php 8 | sed -i -e "s/localhost/$WORDPRESS_DB_HOST/" wp-config.php 9 | echo -e "define('FS_METHOD', 'direct');" >> wp-config.php 10 | 11 | php -S 0.0.0.0:8080 12 | -------------------------------------------------------------------------------- /wordpress/plugins/README.md: -------------------------------------------------------------------------------- 1 | ## Wordpress plugins 2 | 3 | This is the folder to store all your plugins. I use it to store my own plugins, that you can't download from [Wordpress.org](https://wordpress.org). -------------------------------------------------------------------------------- /wordpress/uploads.ini: -------------------------------------------------------------------------------- 1 | file_uploads = On 2 | memory_limit = 64M 3 | upload_max_filesize = 64M 4 | post_max_size = 64M 5 | max_execution_time = 600 --------------------------------------------------------------------------------