Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/v0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosescri committed Jul 23, 2018
2 parents a9b36d0 + a0bc91a commit 977947e
Show file tree
Hide file tree
Showing 87 changed files with 12,079 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DOCKER_SERVICE_PORT=8080
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.env
build
doofinder.zip
node_modules
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM wordpress:latest

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -qq && \
apt-get install -y \
build-essential \
sudo \
less \
nano

RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod +x wp-cli.phar && \
mv wp-cli.phar /usr/local/bin/wpcli

RUN echo 'alias wp="wpcli --path=/var/www/html --allow-root"' >> ~/.bashrc

# OMG: WordPress docker-entrypoint.sh depends on something called apache2*
# to execute anything!!!
COPY docker/apache2-hello.sh /usr/local/bin/apache2-hello.sh
RUN chmod +x /usr/local/bin/apache2-hello.sh

COPY docker/install-wordpress.sh /usr/local/bin/docker-install-wordpress.sh
RUN chmod +x /usr/local/bin/docker-install-wordpress.sh

CMD ["apache2-hello.sh", "docker-install-wordpress.sh", "apache2-foreground"]
43 changes: 43 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = (grunt) ->
require("load-grunt-tasks")(grunt)

grunt.initConfig
clean:
build: ['build/trunk/*', 'build/assets/*']

copy:
source:
expand: true
cwd: "doofinder"
src: ["**/*", "!**/*.scss"]
dest: "build/trunk"
assets:
expand: true
cwd: "assets"
src: ["**/*"]
dest: "build/assets"

version:
code:
src: ["doofinder/doofinder.php"]
text:
options:
prefix: 'Version: '
src: [
"doofinder/doofinder.php",
"doofinder/readme.txt"
]

compress:
source:
options:
archive: "doofinder.zip"
files: [{
expand: true
src: ["doofinder/**/*"]
dest: "/"
}]

grunt.registerTask "build", ["clean", "copy", "compress"]
grunt.registerTask "release", ["version", "build"]
grunt.registerTask "default", ["build"]
Binary file added assets/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '2'

networks:
front:
external:
name: front

services:
db:
image: mysql:5.7
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root

wp:
depends_on:
- db
build: .
volumes:
- ./doofinder:/usr/src/doofinder
restart: unless-stopped
networks:
default:
front:
aliases:
- wordpress
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: root
DOCKER_SERVICE_PORT: ${DOCKER_SERVICE_PORT}
ports:
- "${DOCKER_SERVICE_PORT}:80"
8 changes: 8 additions & 0 deletions docker/apache2-hello.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

echo "Let's install WordPress!"

# Pass through arguments to exec
if [ $# -ge 1 ]; then
exec "$@"
fi
30 changes: 30 additions & 0 deletions docker/install-wordpress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e # (errexit) Exit if any subcommand or pipeline returns a non-zero status
set -u # (nounset) Exit on any attempt to use an uninitialised variable

# Alias for WP-cli to include arguments that we want to use everywhere
shopt -s expand_aliases
alias wp="wpcli --path=/var/www/html --allow-root"

# Install Wordpress with wordpress:latest's script
# docker-entrypoint.sh apache2-hello.sh

cd /var/www/html

if ! $(wp core is-installed); then
echo "Installing WordPress at localhost:${DOCKER_SERVICE_PORT}"
wp core install --url=localhost:${DOCKER_SERVICE_PORT} --title=WooCommerce --admin_user=admin --admin_password=admin123 [email protected] --skip-email

wp plugin install wordpress-importer --activate
wp plugin install polylang --activate

chown -R www-data:www-data /var/www/html

ln -s /usr/src/doofinder /var/www/html/wp-content/plugins
fi

# Pass through arguments to exec
if [ $# -ge 1 ]; then
exec "$@"
fi
1 change: 1 addition & 0 deletions doofinder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/logs
164 changes: 164 additions & 0 deletions doofinder/assets/css/admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
.doofinder-for-wp-warning {
color: #FF9900;
}

.doofinder-for-wp-progress-bar {
height: 25px;

margin: 20px 0;

background-color: white;
background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
background-repeat: repeat-x;

box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
border-radius: 0;

overflow: hidden;
}

.doofinder-for-wp-progress-bar .doofinder-for-wp-bar {
box-sizing: border-box;

width: 0;
height: 100%;

background-color: #0e90d2;
background-image: linear-gradient(top, #149bdf, #0480be);
background-repeat: repeat-x;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);

transition: width 0.15s ease;
}

.doofinder-for-wp-progress-bar-status {
color: #607D8B;
}

.doofinder-for-wp-progress-bar-status p {
display: none;
}

.doofinder-for-wp-progress-bar-status p.active {
display: block;
}

.doofinder-for-wp-additional-messages {
display: none;

margin-bottom: 25px;

color: #607D8B;
}

.doofinder-for-wp-additional-messages.active {
display: block;
}

.doofinder-for-wp-indexing-error {
display: none;

color: #cc0000;
}

.doofinder-for-wp-indexing-error.active {
display: block;
}

.doofinder-for-wp-spinner {
float: none;
}

.form-table td {
position: relative;
}

.doofinder-tooltip {
display: inline-block;

height: 16px;
width: 16px;

vertical-align: middle;
position: absolute;
left: -17px;
top: 21px;

font-size: 15px;
line-height: 1;
color: #666;

cursor: help;
}

.doofinder-tooltip::after {
content: "\f223";

width: 100%;
height: 100%;

position: absolute;
top: 0;
left: 0;

font-family: Dashicons;
text-align: center;
line-height: 1;

speak: none;
cursor: help;
}

.doofinder-tooltip > span {
max-width: 200px;
min-width: 151px;
padding: 7px 11px;

position: absolute;
top: calc(100% + 8px);
left: 50%;
transform: translateX(calc(-50% + 0.5px));
z-index: 2;

text-align: center;
font-size: 10px;
line-height: 18px;
color: #fff;

background: #333;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, .2);

cursor: default;
pointer-events: none;
opacity: 0;

transition: opacity .3s;
}

.doofinder-tooltip > span::after {
content: '';

height: 0;
width: 0;

position: absolute;
top: -12px;
left: 50%;
transform: translateX(calc(-50% - 0.5px));

border: 6px solid transparent;
border-bottom-color: #333;
}

.doofinder-tooltip:hover > span {
opacity: 1;
}

p.description {
font-style: normal;
}

.custom-list li::before {
content: '- ';
}
Loading

0 comments on commit 977947e

Please sign in to comment.