Compare commits

...

2 Commits

3 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
name: wordpress name: ${WPSTACK_PROJECT_NAME:-wpstack}
services: services:
+10 -6
View File
@@ -15,12 +15,13 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
mv wp-cli.phar /usr/local/bin/wp mv wp-cli.phar /usr/local/bin/wp
# install composer dependencies # install composer dependencies
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY composer.json composer.lock ./ COPY composer.json composer.lock ./
RUN --mount=type=secret,id=GITEA_TOKEN \ RUN composer install \
test -n "${GITEA_TOKEN}" && \ --no-dev \
export TOKEN=$(cat /run/secrets/GITEA_TOKEN) && \ --no-interaction \
composer config --global auth.http-basic.seu-gitea.com token $TOKEN && \ --optimize-autoloader \
composer install --no-dev --optimize-autoloader --no-scripts
# modify docker entrypoint for running any .sh scripts found under /usr/local/bin/docker-entrypoint.d # modify docker entrypoint for running any .sh scripts found under /usr/local/bin/docker-entrypoint.d
# scripts will run as www-data if endedd with .unpriv.sh or as root elsewhere # scripts will run as www-data if endedd with .unpriv.sh or as root elsewhere
@@ -43,4 +44,7 @@ exec "\$@";
EOF EOF
COPY docker/wordpress/scripts/docker-entrypoint.d/* /docker-entrypoint.d/ COPY docker/wordpress/scripts/docker-entrypoint.d/* /docker-entrypoint.d/
RUN chmod +x /docker-entrypoint.d/*.sh RUN chmod +x /docker-entrypoint.d/*.sh
# cleanup
RUN rm /usr/bin/composer
+1
View File
@@ -2,6 +2,7 @@ DB_HOST=db
DB_USER=wordpress DB_USER=wordpress
DB_NAME=wordpress DB_NAME=wordpress
DB_PASS=mysecretpassword DB_PASS=mysecretpassword
WPSTACK_PROJECT_NAME=wpstack-example # rename your project
WPSTACK_ADMIN_EMAIL=contato@example.com # use a valid email WPSTACK_ADMIN_EMAIL=contato@example.com # use a valid email
WPSTACK_PROTOCOL=https WPSTACK_PROTOCOL=https
WPSTACK_DOMAIN=localhost WPSTACK_DOMAIN=localhost