Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6988527fa | |||
| 48fd25a991 |
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
name: wordpress
|
name: ${WPSTACK_PROJECT_NAME:-wpstack}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -44,3 +45,6 @@ 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
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user