Moved Dockerfile from devops repo here, removed redundant ant build config, removed unused config, added dockerignore

This commit is contained in:
2026-02-09 12:40:32 +01:00
parent 329f68abb7
commit c948ba1de3
4 changed files with 39 additions and 80 deletions

25
.dockerignore Normal file
View File

@@ -0,0 +1,25 @@
.git
.gitignore
.gitattributes
.github/
.vscode/
.idea/
.DS_Store
Thumbs.db
*.log
logs.conf
logs/
docker-compose.yml
compose.yml
.env
.env.*
wp-config-local.php
node_modules/
vendor/
**/.cache/
**/tmp/
**/temp/

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM wordpress:6.1.1-php8.2
ARG ENV_NAME
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer install
COPY --chown=www-data:www-data ./htdocs/ /var/www/html/
COPY --chown=www-data:www-data ./environments/docker_container/ /var/www/html/
COPY --chown=www-data:www-data ./environments/all/ /var/www/html/
COPY --chown=www-data:www-data ./environments/${ENV_NAME}/robots.txt /var/www/html/robots.txt

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="LawCarta wordpress project" default="build-without-tests">
<target name="build-without-tests"
depends="composer_install, replace, archive"
description="Build project and run all tests"/>
<target name="replace"
unless="replace.done"
description="Replace placeholders in config files" >
<replace dir="../environments" token="@lcAwsKey@" value="${lcAwsKey}"/>
<replace dir="../environments" token="@lcAwsSecretKey@" value="${lcAwsSecretKey}"/>
<replace dir="../environments" token="@lcWpMySqlHostDev@" value="${lcWpMySqlHostDev}"/>
<replace dir="../environments" token="@lcWpMySqlDbnameDev@" value="${lcWpMySqlDbnameDev}"/>
<replace dir="../environments" token="@lcWpMySqlUsernameDev@" value="${lcWpMySqlUsernameDev}"/>
<replace dir="../environments" token="@lcWpMySqlPasswordDev@" value="${lcWpMySqlPasswordDev}"/>
<replace dir="../environments" token="@lcWpMySqlHostQA@" value="${lcWpMySqlHostQA}"/>
<replace dir="../environments" token="@lcWpMySqlDbnameQA@" value="${lcWpMySqlDbnameQA}"/>
<replace dir="../environments" token="@lcWpMySqlUsernameQA@" value="${lcWpMySqlUsernameQA}"/>
<replace dir="../environments" token="@lcWpMySqlPasswordQA@" value="${lcWpMySqlPasswordQA}"/>
<replace dir="../environments" token="@lcWpMySqlHostDemo@" value="${lcWpMySqlHostDemo}"/>
<replace dir="../environments" token="@lcWpMySqlDbnameDemo@" value="${lcWpMySqlDbnameDemo}"/>
<replace dir="../environments" token="@lcWpMySqlUsernameDemo@" value="${lcWpMySqlUsernameDemo}"/>
<replace dir="../environments" token="@lcWpMySqlPasswordDemo@" value="${lcWpMySqlPasswordDemo}"/>
<replace dir="../environments" token="@lcWpMySqlHostStaging@" value="${lcWpMySqlHostStaging}"/>
<replace dir="../environments" token="@lcWpMySqlDbnameStaging@" value="${lcWpMySqlDbnameStaging}"/>
<replace dir="../environments" token="@lcWpMySqlUsernameStaging@" value="${lcWpMySqlUsernameStaging}"/>
<replace dir="../environments" token="@lcWpMySqlPasswordStaging@" value="${lcWpMySqlPasswordStaging}"/>
<replace dir="../environments" token="@lcWpMySqlHostProd@" value="${lcWpMySqlHostProd}"/>
<replace dir="../environments" token="@lcWpMySqlDbnameProd@" value="${lcWpMySqlDbnameProd}"/>
<replace dir="../environments" token="@lcWpMySqlUsernameProd@" value="${lcWpMySqlUsernameProd}"/>
<replace dir="../environments" token="@lcWpMySqlPasswordProd@" value="${lcWpMySqlPasswordProd}"/>
<property name="replace.done" value="true"/>
</target>
<target name="composer_install">
<exec dir="${basedir}/.." executable="composer" failonerror="true">
<arg line="install" />
</exec>
</target>
<target name="archive">
<tar compression="gzip" destfile="lc_wp.tar.gz" longfile="posix">
<tarfileset dir="${basedir}/..">
<include name="*/**" />
<exclude name="build/**" />
</tarfileset>
</tar>
</target>
</project>

View File

@@ -1,21 +0,0 @@
<?php
define( 'DB_NAME', '@lcWpMySqlDbnameDev@' );
define( 'DB_USER', '@lcWpMySqlUsernameDev@' );
define( 'DB_PASSWORD', '@lcWpMySqlPasswordDev@' );
define( 'DB_HOST', '@lcWpMySqlHostDev@' );
define('DOMAIN_CURRENT_SITE', 'dev.livecarta.com');
define('LAWCARTA_SUBDOMAIN', 'app-dev');
define('LAWCARTA_PORT', '');
define('LAWCARTA_WP_REST_API_REQUEST_URL', 'https://app-dev.livecarta.com/v1/event/request');
define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app-dev.livecarta.com/v1/event/response');
define('LAWCARTA_ENVIRONMENT_NAME', 'dev');
define('LC_ALLOW_COOKIE_POPUP', true);
define('LC_GTM', 'GTM-KXTRR4Q');
$_SERVER['HTTPS'] = 'On';