Commit de782531 authored by Fabian Vogel's avatar Fabian Vogel

Initial commit

"id": "com.oxidesales.eshop",
"title": "OXID eShop",
"author": "Fabian Vogel <>",
"description": "This is an example app",
"version": "0.0.1",
"healthCheckPath": "/",
"httpPort": 8000,
"addons": {
"localstorage": {},
"mysql": {},
"email": {}
"manifestVersion": 2,
"website": "",
"documentationUrl": "",
"contactEmail": "",
"tags": [ "ecommerce", "shop" ]
\ No newline at end of file
FROM composer as builder
WORKDIR /var/www/html/
RUN composer create-project --no-interaction --no-dev oxid-esales/oxideshop-project . dev-b-6.1-ce
RUN find . -type f -name '*.pdf' -exec rm -rf {} \;
RUN chown -R www-data:www-data /var/www/html/*
RUN chmod -R 775 /var/www/html/
RUN chmod 444 /var/www/html/source/
RUN chmod 444 /var/www/html/source/.htaccess
FROM cloudron/base:1.0.0
COPY --from=builder --chown=www-data:www-data /var/www/html /var/www/html
COPY /var/www/html/source/
# install packages
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev libfreetype6 libpng-dev libjpeg-dev libxml2-dev libwebp6 libxpm4 default-mysql-client php7.2-bcmath && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
# prepare apache
RUN rm /etc/apache2/sites-enabled/* \
&& sed -e 's,^ErrorLog.*,ErrorLog "/dev/stderr",' -i /etc/apache2/apache2.conf \
&& sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf \
&& a2disconf other-vhosts-access-log \
&& echo "Listen 8000" > /etc/apache2/ports.conf
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN echo 'SetEnvIf X-Forwarded-Proto "https" HTTPS=on' >> /var/www/html/source/.htaccess
# add apache config
ADD app.conf /etc/apache2/sites-available/app.conf
RUN a2ensite app && a2enmod rewrite && a2enmod headers && a2enmod expires
# change session store
RUN mkdir -p /run/php/sessions && \
chown www-data:www-data /run/php/sessions && \
rm -rf /var/lib/php/sessions && ln -s /run/php/sessions /var/lib/php/sessions
COPY /app/start/
RUN chown -R www-data.www-data /app/start && chmod +x /app/start/
CMD [ "/app/start/" ]
<VirtualHost *:8000>
DocumentRoot /app/data/source
ErrorLog "|/bin/cat"
CustomLog "|/bin/cat" combined
<Directory /app/code/source>
Options +FollowSymLinks
AllowOverride All
Require all granted
<IfModule mod_php7.c>
php_value memory_limit 64m
* This file is part of OXID eShop Community Edition.
* OXID eShop Community Edition is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <>.
* @link
* @copyright (C) OXID eSales AG 2003-2016
* @version OXID eShop CE
// Database connection information
$this->dbType = 'pdo_mysql';
$this->dbHost = \getenv('CLOUDRON_MYSQL_HOST'); // database host name
$this->dbPort = \getenv('CLOUDRON_MYSQL_PORT'); // tcp port to which the database is bound
$this->dbName = \getenv('CLOUDRON_MYSQL_DATABASE'); // database name
$this->dbUser = \getenv('CLOUDRON_MYSQL_USERNAME'); // database user name
$this->dbPwd = \getenv('CLOUDRON_MYSQL_PASSWORD'); // database user password
$this->sShopURL = \getenv('CLOUDRON_APP_ORIGIN'); // eShop base url, required
$this->sSSLShopURL = \getenv('CLOUDRON_APP_ORIGIN'); // eShop SSL url, optional
$this->sAdminSSLURL = null; // eShop Admin SSL url, optional
$this->sShopDir = '/app/data/source';
$this->sCompileDir = '/app/data/source/tmp';
* Force shop edition. Even if enterprise or professional packages exists, shop edition can still be forced here.
* Possible options: CE|PE|EE or left empty (will be determined automatically).
$this->edition = '';
// File type whitelist for file upload
$this->aAllowedUploadTypes = array('jpg', 'gif', 'png', 'pdf', 'mp3', 'avi', 'mpg', 'mpeg', 'doc', 'xls', 'ppt');
// Timezone information
* Search engine friendly URL processor.
* After changing this value, you should rename oxid.php file as well
* Always leave .php extension here unless you know what you are doing
$this->sOXIDPHP = "oxid.php";
* Enable debug mode for template development or bugfixing
* -1 = Log more messages and throw exceptions on errors (not recommended for production)
* 0 = off
* 1 = smarty
* 3 = smarty
* 4 = smarty + shoptemplate data
* 5 = Delivery Cost calculation info
* 6 = SMTP Debug Messages
* 8 = display smarty template names (requires /tmp cleanup)
$this->iDebug = 0;
// Log all modifications performed in Admin
$this->blLogChangesInAdmin = false;
// Force admin email. Offline warnings are sent with high priority to this address.
$this->sAdminEmail = '';
// Defines the time interval in seconds warnings are sent during the shop is offline.
$this->offlineWarningInterval = 60 * 5;
// In case session must be started on the very first user page visit (not only on session required action).
$this->blForceSessionStart = false;
// Use browser cookies to store session id (no sid parameter in URL)
$this->blSessionUseCookies = true;
* The domain that the cookie is available: array(_SHOP_ID_ => _DOMAIN_);
* Check setcookie() documentation for more details:
$this->aCookieDomains = null;
* The path on the server in which the cookie will be available on: array(_SHOP_ID_ => _PATH_);
* Check setcookie() documentation for more details:
$this->aCookiePaths = null;
// List of all Search-Engine Robots
$this->aRobots = array(
// Deactivate Static URL's for these Robots
$this->aRobotsExcept = array();
// IP addresses for which session/cookie id match and user agent change checks are off
$this->aTrustedIPs = array();
* Works only if basket reservations feature is enabled in admin.
* The number specifies how many expired basket reservations are
* cleaned per one request (to the eShop).
* Cleaning a reservation basically means returning the reserved
* stock to the articles.
* Keeping this number too low may cause article stock being returned too
* slowly, while too high value may have spiking impact on the performance.
$this->iBasketReservationCleanPerRequest = 200;
* Should template blocks be highlighted in frontend?
* This is mainly intended for module writers in non productive environment
$this->blDebugTemplateBlocks = false;
* Should requests, coming via stdurl and not redirected to seo url be logged to seologs db table?
* Note: only active if in productive mode, as the eShop in non productive more will always log such urls
$this->blSeoLogging = false;
* To override FrontendController::$_aUserComponentNames use this array option:
* array keys are component(class) names and array values defines if component is cacheable (true/false)
* E.g. array('user_class' => false);
$this->aUserComponentNames = null;
// Additional multi language tables
$this->aMultiLangTables = null;
// Instructs shop that price update is performed by cron (time based job sheduler)
$this->blUseCron = false;
// Do not disable module if class from extension path does not exist.
$this->blDoNotDisableModuleOnError = false;
// Enable temporarily in case you can't access the backend due to broken views
$this->blSkipViewUsage = false;
* Enterprise Edition related config options.
* This options have no effect on Community/Professional Editions.
//Time limit in ms to be notified about slow queries
$this->iDebugSlowQueryTime = 20;
* Enables Rights and Roles engine
* 0 - off,
* 1 - only in admin,
* 2 - only in shop,
* 3 - both
$this->blUseRightsRoles = 3;
* Define oxarticles fields which could be edited individually in subshops.
* Do not forget to add these fields to oxfield2shop table.
* Note: The field names are case sensitive here.
// Show "Update Views" button in admin
$this->blShowUpdateViews = true;
// If default 30 seconds is not enougth
// @set_time_limit(3000);
* Database master-slave configuration:
* aSlaveHosts - array of slave hosts: array('localhost', '')
$this->aSlaveHosts = null;
// Control the removal of Setup directory
$this->blDelSetupDir = true;
* Needed for backwards compatibility. Do not change the value of this property.
* @deprecated since v6.0 (2017-05-15); This property will be removed in the future as the shop will always use UTF-8.
$this->iUtfMode = 1;
\ No newline at end of file
mkdir -p /run/php/sessions
chown www-data:www-data /run/php/sessions
#rm -rf /var/lib/php/sessions && ln -s /run/php/sessions /var/lib/php/sessions
cp -pr /var/www/html/* /app/data
# bootstrap oxid database/demodata
if [ "${MYSQL_CHECKDATA}" = "" ]
mysql -h ${CLOUDRON_MYSQL_HOST} -u ${CLOUDRON_MYSQL_USERNAME} -p${CLOUDRON_MYSQL_PASSWORD} ${CLOUDRON_MYSQL_DATABASE} < /app/data/source/Setup/Sql/database_schema.sql
echo "db schema created"
if [ "${OXID_DEMODATA}" = true ]
php /app/data/vendor/bin/oe-eshop-doctrine_migration migrations:migrate
mysql -h ${CLOUDRON_MYSQL_HOST} -u ${CLOUDRON_MYSQL_USERNAME} -p${CLOUDRON_MYSQL_PASSWORD} ${CLOUDRON_MYSQL_DATABASE} < /app/data/vendor/oxid-esales/oxideshop-demodata-ce/src/demodata.sql
echo "demodata installed"
php /app/data/vendor/bin/oe-eshop-db_views_regenerate
echo "views regenerated"
rm -rf /app/data/source/Setup/
echo "initial data imported"
php /app/data/vendor/bin/oe-eshop-doctrine_migration migrations:migrate
echo "migration done"
php /app/data/vendor/bin/oe-eshop-db_views_regenerate
if [ $? -eq 0 ];
echo "views regenerated"
echo "views not regenerated"
rm -rf /app/data/source/Setup/
echo "Starting apache..."
APACHE_CONFDIR="" source /etc/apache2/envvars
rm -f "${APACHE_PID_FILE}"
exec /usr/sbin/apache2 -DFOREGROUND
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment