aboutsummaryrefslogtreecommitdiff
path: root/sandcastle/images/woocommerce
diff options
context:
space:
mode:
Diffstat (limited to 'sandcastle/images/woocommerce')
-rw-r--r--sandcastle/images/woocommerce/Dockerfile99
-rw-r--r--sandcastle/images/woocommerce/docker-compose.yml46
-rwxr-xr-xsandcastle/images/woocommerce/entry-point.sh50
-rw-r--r--sandcastle/images/woocommerce/tags.conf21
-rw-r--r--sandcastle/images/woocommerce/woocommerce.conf47
5 files changed, 0 insertions, 263 deletions
diff --git a/sandcastle/images/woocommerce/Dockerfile b/sandcastle/images/woocommerce/Dockerfile
deleted file mode 100644
index 0d16df7..0000000
--- a/sandcastle/images/woocommerce/Dockerfile
+++ /dev/null
@@ -1,99 +0,0 @@
-FROM debian:bullseye
-
-# This file is in the public domain.
-
-LABEL docker-woocommerce.demo.taler.net="0.0.1-beta"
-RUN echo "avoid docker cache..."
-
-EXPOSE 9001
-
-WORKDIR /root/
-
-COPY tags.conf .
-COPY entry-point.sh .
-
-# Install dependencies
-
-
-RUN apt-get update && apt-get install -y \
- software-properties-common \
- ca-certificates \
- lsb-release \
- apt-transport-https \
- wget \
- curl \
- git \
- unzip \
- gnupg \
- nginx
-
-RUN sh -c 'echo "deb https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list'
-
-RUN wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -
-
-RUN apt-get update
-
-RUN . /root/tags.conf \
- && apt-get install \
- php${PHP_VERSION} \
- php${PHP_VERSION}-common \
- php${PHP_VERSION}-mbstring \
- php${PHP_VERSION}-xmlrpc \
- php${PHP_VERSION}-soap \
- php${PHP_VERSION}-gd \
- php${PHP_VERSION}-xml \
- php${PHP_VERSION}-intl \
- php${PHP_VERSION}-mysql \
- php${PHP_VERSION}-cli \
- php${PHP_VERSION}-ldap \
- php${PHP_VERSION}-zip \
- php${PHP_VERSION}-curl\
- php${PHP_VERSION}-zip \
- php${PHP_VERSION}-fpm -y
-
-# Download Wordpress, plugins and theme + extract
-
-RUN . /root/tags.conf \
- && mkdir -p /var/www/wordpress/wp-content/plugins \
- && mkdir -p /var/www/wordpress/wp-content/themes \
- && wget https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz \
- && tar -xzf wordpress-${WORDPRESS_VERSION}.tar.gz -C /var/www/ \
- && wget https://downloads.wordpress.org/plugin/woocommerce.${WOOCOMMERCE_VERSION}.zip \
- && unzip woocommerce.${WOOCOMMERCE_VERSION}.zip -d /var/www/wordpress/wp-content/plugins \
- && wget https://downloads.wordpress.org/theme/ecommerce-star.${WORDPRESS_PARENT_THEME_VERSION}.zip \
- && unzip ecommerce-star.${WORDPRESS_PARENT_THEME_VERSION}.zip -d /var/www/wordpress/wp-content/themes \
- && wget https://downloads.wordpress.org/theme/shop-here.${WORDPRESS_CHILD_THEME_VERSION}.zip \
- && unzip shop-here.${WORDPRESS_CHILD_THEME_VERSION}.zip -d /var/www/wordpress/wp-content/themes \
- && wget https://downloads.wordpress.org/plugin/gnu-taler-payment-for-woocommerce.zip \
- && unzip gnu-taler-payment-for-woocommerce.zip -d /var/www/wordpress/wp-content/plugins
-
-# Install wp-cli
-
-RUN wget 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/wp
-
-
-RUN chown -R www-data:www-data /var/www/wordpress
-
-# Remove downloads from root directory
-
-RUN rm -Rf /root/*.zip
-
-# Copy nginx configuration from host, to container
-
-COPY woocommerce.conf /etc/nginx/sites-available
-
-RUN ln -s /etc/nginx/sites-available/woocommerce.conf /etc/nginx/sites-enabled/woocommerce.conf \
- && rm /etc/nginx/sites-enabled/default
-
-
-# Execute entrypoint
-
-RUN chmod +x entry-point.sh
-
-ENTRYPOINT /root/entry-point.sh
-
-# Additional steps after entrypoint.
-
-#CMD ["nginx", "-g", "daemon off;"]
diff --git a/sandcastle/images/woocommerce/docker-compose.yml b/sandcastle/images/woocommerce/docker-compose.yml
deleted file mode 100644
index 63850d6..0000000
--- a/sandcastle/images/woocommerce/docker-compose.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-version: '3'
-services:
- db:
- image: mariadb
- environment:
- MARIADB_DATABASE: exampledb
- MYSQL_USER: wordpress_user
- MYSQL_PASSWORD: wordpress_password
- MYSQL_RANDOM_ROOT_PASSWORD: "1"
- volumes:
- - mariadb_data:/var/lib/mysql
- wordpress:
- build: images/woocommerce
- image: woo
- container_name: woocommerce_taler
- depends_on:
- - db
- ports:
- - "9001:80"
- environment:
- WORDPRESS_DB_HOST: db:3306
- WORDPRESS_DB_USER: wordpress_user
- WORDPRESS_DB_PASSWORD: wordpress_password
- WORDPRESS_DB_NAME: exampledb
- WORDPRESS_TABLE_PREFIX: "wp_"
- WORDPRESS_DEBUG: 1
- volumes:
- - wp_data:/var/www/wordpress
- - /home/jj/final-woocommerce-docker/nginx-conf:/etc/nginx/conf.d
- wordpress-cli:
- container_name: wp_cli
- #entrypoint: wordpress
- depends_on:
- - db
- - wordpress
- volumes:
- - wp_data:/var/www/wordpress
- image: wordpress:cli
- links:
- - db:db
- working_dir: /var/www/wordpress
- user: "33"
- command: wp core install --path="/var/www/wordpress" --url="http://woocommerce.valenciatech.com" --title=gnu-taler --admin_user=admin --admin_password=admin --admin_email=your-email-here
-volumes:
- wp_data:
- mariadb_data:
diff --git a/sandcastle/images/woocommerce/entry-point.sh b/sandcastle/images/woocommerce/entry-point.sh
deleted file mode 100755
index d954d78..0000000
--- a/sandcastle/images/woocommerce/entry-point.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-source /root/tags.conf
-
-# Import the whole database (if wp-cli works, this wont be necessary)
-
-#mysql -u ${MARIADB_USER} -p${MARIADB_PASSWORD} ${MARIADB_DATABASE_NAME} < woocommerce.sql
-
-# Rename wordpress config file
-
-mv /var/www/wordpress/wp-config-sample.php /var/www/wordpress/wp-config.php
-
-# Replace values database connection
-
-# Replace values with .env VARIABLES
-
-sed -ie "s/database_name_here/${WORDPRESS_DATABASE_NAME}/g" /var/www/wordpress/wp-config.php \
- && sed -ie "s/username_here/${WORDPRESS_DATABASE_USER}/g" /var/www/wordpress/wp-config.php \
- && sed -ie "s/password_here/${WORDPRESS_DATABASE_PASSWORD}/g" /var/www/wordpress/wp-config.php \
- && sed -ie "s/localhost/${WORDPRESS_DATABASE_HOST}/g" /var/www/wordpress/wp-config.php
-
-
-# Install WP (either do it here, or through the docker-compose.yml).
-
-#wp core install --allow-root --url=test.woocommerce.taler.net --title=GNU Taler for WooCommerce --admin_user=admin --admin_password=admin --admin_email=info@example.com
-
-# Enable theme shop-here
-
-#wp theme enable shop-here
-
-# Activate Woocommerce plugin
-
-#wp plugin activate woocommerce
-
-# Activate GNU Taler plugin
-
-#wp plugin activate gnu-taler-payment-for-woocommerce
-
-# Import products into database
-
-#wp import /woocommerce-products-backup.xml --authors=create
-
-service nginx start
-
-service php${PHP_VERSION}-fpm start
-
-
-while true; do
- sleep 100;
- done
diff --git a/sandcastle/images/woocommerce/tags.conf b/sandcastle/images/woocommerce/tags.conf
deleted file mode 100644
index 2ac9d96..0000000
--- a/sandcastle/images/woocommerce/tags.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# Software versions
-
-PHP_VERSION="8.2"
-WOOCOMMERCE_VERSION="7.1.1"
-WORDPRESS_VERSION="6.1"
-WORDPRESS_PARENT_THEME_VERSION="1.3.9"
-WORDPRESS_CHILD_THEME_VERSION="1.0.2"
-
-# MariaDB credentials (just in case)
-
-MARIADB_USER="wordpress_user"
-MARIADB_PASSWORD="wordpress_password"
-MARIADB_DATABASE_NAME="exampledb"
-
-# Database connection details
-
-WORDPRESS_DATABASE_NAME="exampledb"
-WORDPRESS_DATABASE_USER="wordpress_user"
-WORDPRESS_DATABASE_PASSWORD="wordpress_password"
-WORDPRESS_DATABASE_HOST="db"
diff --git a/sandcastle/images/woocommerce/woocommerce.conf b/sandcastle/images/woocommerce/woocommerce.conf
deleted file mode 100644
index b560802..0000000
--- a/sandcastle/images/woocommerce/woocommerce.conf
+++ /dev/null
@@ -1,47 +0,0 @@
-# Upstream to abstract backend connection(s) for php
-upstream php {
- server unix:/var/run/php/php8.2-fpm.sock;
- server 127.0.0.1:9000;
-}
-
-server {
- listen 80;
- server_name _;
- ## Your website name goes here.
- # server_name woocommerce.valenciatech.cloud;
- ## Your only path reference.
- root /var/www/wordpress;
- ## This should be in your http block and if it is, it's not needed here.
- index index.php;
-
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
-
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
-
- location / {
- # This is cool because no php is touched for static content.
- # include the "?$args" part so non-default permalinks doesn't break when using query string
- try_files $uri $uri/ /index.php?$args;
- }
-
- location ~ \.php$ {
- #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- include fastcgi_params;
- fastcgi_intercept_errors on;
- fastcgi_pass php;
- #The following parameter can be also included in fastcgi_params file
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- }
-}