Deploy wordpress to AWS ecs fargte with copying wp-content from local to base wordpress image #831
Replies: 2 comments
-
Did you previously initialize your database on a different URL? Is whatever's reverse-proxying in front of your instance setting the appropriate For the persistence issue, you'll want to make sure |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you for your response!! I appreciate it as I am struggling to complete this implemetation from long time.
SetEnvIf X-Forwarded-Proto "https" HTTPS=on RewriteEngine OnRewriteCond %{HTTPS} !=on RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] I am using below stack for this application. Route53-Cloudfront-ApplicationLoadBalnacer-AWS ECS Fargate Container.
while deploying everytime I need to copy my wp-content over base image and it should not ask wp-admin setup for every deployment. |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I am trying to automate wordpress deployment to aws fargate services with custom docker image. I am able to deploy my application and I am accessing wp-admin also but when I am trying to access main page with url its going to redirection loop.
https://wordpress.dev.data.com/wp-admin - working fine
https://wordpress.dev.data.com - redirection loop
One more issue I am having is for each deployment its asking intial setup, which shuld not happen, this might be because of new conatiner severy time let me know is there any other approach we can follow to perssist data.
below is my docker file.
FROM wordpress:latest
COPY apache /etc/apache2/sites-available
COPY php /usr/local/etc/php/conf.d
COPY .htaccess /var/www/html/
COPY ./wp-content/ /var/www/html/wp-content
RUN set -x
&& apt-get update
&& apt-get install -y
awscli
libzip-dev
jq
zip
libldap2-dev
locales
wget
gnupg
coreutils
&& rm -rf /var/lib/apt/lists/*
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu
&& docker-php-ext-install ldap
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
&& locale-gen
&& apt-get purge -y --auto-remove libldap2-dev
RUN cd /var/www/html/wp-content/themes/data&&
curl -sL https://deb.nodesource.com/setup_16.x | bash - &&
apt-get install -y nodejs &&
apt-get install -y curl bash git &&
npm install &&
npm install -g bower &&
npm install -g gulp &&
npm run build
RUN ls -l /var/www/html
RUN ls -l /var/www/html/wp-content
RUN chown -R www-data:www-data /var/www/html
RUN chmod -R 755 /var/www/html
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
Beta Was this translation helpful? Give feedback.
All reactions