-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from suthanbala/feature/refactor-codebase
Feature/refactor codebase
- Loading branch information
Showing
92 changed files
with
19,559 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# The site domain | ||
SITE_URL=test.suthanbala.com | ||
|
||
# Wordpress Version | For all versions available visit https://hub.docker.com/_/wordpress?tab=tags&page=1 | ||
WP_VERSION=latest | ||
|
||
# Database for MYSQL | ||
DB_USER=root | ||
MYSQL_DATABASE=suthanbala | ||
MYSQL_DATABASE=my_wordpress | ||
MYSQL_ROOT_PASSWORD=mydbP@$$word |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/src/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,20 @@ | ||
FROM php:5.6-apache | ||
|
||
RUN a2enmod rewrite | ||
|
||
# install the PHP extensions we need | ||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* \ | ||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ | ||
&& docker-php-ext-install gd | ||
RUN docker-php-ext-install mysqli | ||
|
||
# Installing rsync for copying files | ||
RUN apt-get update && apt-get install -y rsync | ||
|
||
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress | ||
RUN curl -o wordpress.tar.gz -SL https://wordpress.org/latest.tar.gz \ | ||
&& tar -xzf wordpress.tar.gz --strip-components=1 -C /var/www/html/ \ | ||
&& rm wordpress.tar.gz \ | ||
&& chown -R www-data:www-data /var/www/html/ | ||
|
||
# Install the Node | ||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash | ||
RUN apt-get install -y nodejs | ||
|
||
FROM node:latest | ||
WORKDIR /var/www/html | ||
|
||
# Installing Gulp, BrowserSync and other Necessary packages | ||
# Copying our package.json containing all the necessary dependencies | ||
COPY package.json /var/www/html/package.json | ||
RUN npm install -g browser-sync gulp --save-dev | ||
RUN npm install gulp-sass gulp-concat gulp-rename gulp-uglify gulp-sourcemaps --save-dev | ||
|
||
# Links the global packages | ||
RUN npm link gulp | ||
RUN npm link browser-sync | ||
# Installing Gulp, BrowserSync and other necessary packages | ||
RUN npm i | ||
|
||
# Copy all the Gulp related files | ||
COPY gulp ./gulp | ||
COPY ./gulpfile.js ./gulpfile.js | ||
|
||
COPY docker-entrypoint.sh /entrypoint.sh | ||
COPY gulpfile.js /var/www/html/gulpfile.js | ||
# Exposing port 3000 for the page to be served via BrowserSync | ||
EXPOSE 3000 | ||
|
||
# grr, ENTRYPOINT resets CMD now | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
# Exposing port 3001 for the admin console for BrowserSync | ||
EXPOSE 3001 | ||
|
||
# CMD ["apache2-foreground && gulp"] | ||
CMD ["apache2-foreground"] | ||
CMD ["npm run watch"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,61 @@ | ||
version: '3.1' | ||
version: "3.1" | ||
services: | ||
wordpress: | ||
container_name: 'wp' | ||
build: . | ||
container_name: "wp" | ||
image: wordpress:${WP_VERSION} | ||
restart: unless-stopped | ||
links: | ||
- mysql | ||
depends_on: | ||
- mysql-wordpress | ||
volumes: | ||
- ./src/themes/:/var/www/html/wp-content/themes | ||
- ./src/plugins/:/var/www/html/wp-content/plugins | ||
- ./src/uploads/:/var/www/html/wp-content/uploads | ||
- ./build:/build | ||
- "node-modules:/var/node_modules" | ||
ports: | ||
- 80:80 | ||
- 3000:3000 | ||
- 3001:3001 | ||
env_file: | ||
- ./.env | ||
environment: | ||
- WORDPRESS_DB_HOST=mysql | ||
- WORDPRESS_DB_HOST=mysql-wordpress | ||
- WORDPRESS_DB_USER=${DB_USER} | ||
- WORDPRESS_DB_PASSWORD=${MYSQL_ROOT_PASSWORD} | ||
- WORDPRESS_DB_NAME=${MYSQL_DATABASE} | ||
- SITE_URL=${SITE_URL} | ||
command: /bin/bash -c "apache2-foreground & gulp" | ||
mysql: | ||
container_name: "wp-db" | ||
browsersync: | ||
container_name: 'browsersync' | ||
depends_on: | ||
- wordpress | ||
build: | ||
context: ./src | ||
dockerfile: ../Dockerfile | ||
restart: unless-stopped | ||
links: | ||
- wordpress:${SITE_URL} | ||
env_file: | ||
- ./.env | ||
ports: | ||
- 3000:3000 | ||
- 3001:3001 | ||
volumes: | ||
- ./src/themes/:/var/www/html/themes | ||
- ./src/gulp/gulp-tasks:/var/www/html/gulp/gulp-tasks | ||
- ./src/gulpfile.js:/var/www/html/gulpfile.js | ||
command: "npm run watch" | ||
mysql-wordpress: | ||
container_name: "mysql-wordpress" | ||
image: mysql | ||
restart: unless-stopped | ||
volumes: | ||
- ./build/sql:/build/sql | ||
- ./src/initial-db:/docker-entrypoint-initdb.d | ||
- ./src/initial-db:/docker-entrypoint-initdb.d | ||
env_file: | ||
- .env | ||
- ./.env | ||
command: "--default-authentication-plugin=mysql_native_password" | ||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin | ||
links: | ||
- mysql:db | ||
- mysql-wordpress:db | ||
restart: always | ||
ports: | ||
- 8080:80 | ||
- 8080:80 | ||
environment: | ||
- PMA_ARBITRARY=1 | ||
- PMA_USER=${DB_USER} | ||
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} | ||
volumes: | ||
node-modules: | ||
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} |
Oops, something went wrong.