Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WordPress app container and install pdo_mysql #6

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,26 @@ set -e
images=()
# The image will be pushed to GitHub container registry
repobase="${REPOBASE:-ghcr.io/nethserver}"
wordpress_version="6.4.3-php8.3-apache"
#Create webtop-webapp container
reponame="wordpress-app"
container=$(buildah from docker.io/wordpress:${wordpress_version})
buildah run "${container}" /bin/sh <<'EOF'
set -e
docker-php-ext-install pdo_mysql
EOF
# Commit the image
buildah commit --rm "${container}" "${repobase}/${reponame}"

# Append the image URL to the images array
images+=("${repobase}/${reponame}")


# Configure the image name
reponame="wordpress"

# Create a new empty container image
container=$(buildah from scratch)

# Reuse existing nodebuilder-wordpress container, to speed up builds
if ! buildah containers --format "{{.ContainerName}}" | grep -q nodebuilder-wordpress; then
echo "Pulling NodeJS runtime..."
Expand Down Expand Up @@ -45,7 +59,7 @@ buildah config --entrypoint=/ \
--label="org.nethserver.authorizations=traefik@node:routeadm" \
--label="org.nethserver.tcp-ports-demand=3" \
--label="org.nethserver.rootfull=0" \
--label="org.nethserver.images=docker.io/mariadb:10.11.5 docker.io/wordpress:6.4.3-php8.3-apache" \
--label="org.nethserver.images=docker.io/mariadb:10.11.5 ${repobase}/wordpress-app:${IMAGETAG:-latest}" \
"${container}"
# Commit the image
buildah commit "${container}" "${repobase}/${reponame}"
Expand Down
2 changes: 1 addition & 1 deletion imageroot/systemd/user/wordpress-app.service
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/wordpress-app.pid \
--env WORDPRESS_SECURE_AUTH_SALT="${SECRET}" \
--env WORDPRESS_LOGGED_IN_SALT="${SECRET}" \
--env WORDPRESS_NONCE_SALT="${SECRET}" \
${WORDPRESS_IMAGE}
${WORDPRESS_APP_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/wordpress-app.ctr-id -t 10
ExecReload=/usr/bin/podman kill -s HUP wordpress-app
SyslogIdentifier=%u
Expand Down
Loading