Created
December 16, 2024 18:37
-
-
Save qrkourier/5b554dcb58eb7df2d166d9cce3291c6f to your computer and use it in GitHub Desktop.
Publish Docker WordPress as a zrok reserved public share
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# companion gist for https://www.youtube.com/live/zWxjwCPuiXg | |
# | |
# set these variables in .env | |
# ZIGGY_UID - the numeric ID of the user that owns ~/.zrok on the Docker host | |
# ZIGGY_GID - the mumeric ID of the group that owns ~/.zrok on the Docker host | |
# ZROK_RESERVED_SHARE - the unique name of the zrok reserved public share | |
# MYSQL_ROOT_PASSWORD | |
# MYSQL_PASSWORD | |
# | |
services: | |
db: | |
# We use a mariadb image which supports both amd64 & arm64 architecture | |
image: mariadb:10.6.4-focal | |
# If you really want to use MySQL, uncomment the following line | |
#image: mysql:8.0.27 | |
command: '--default-authentication-plugin=mysql_native_password' | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD | |
- MYSQL_DATABASE=wordpress | |
- MYSQL_USER=wordpress | |
- MYSQL_PASSWORD | |
expose: | |
- 3306 | |
- 33060 | |
wordpress: | |
image: wordpress:latest | |
volumes: | |
- wp_data:/var/www/html | |
expose: | |
- 80 | |
ports: | |
- 127.0.0.1:8192:80 | |
restart: always | |
environment: | |
- WORDPRESS_DB_HOST=db | |
- WORDPRESS_DB_USER=wordpress | |
- WORDPRESS_DB_PASSWORD | |
- WORDPRESS_DB_NAME=wordpress | |
zrok: | |
image: openziti/zrok | |
restart: unless-stopped | |
user: "${ZIGGY_UID}:${ZIGGY_GID}" | |
volumes: | |
- ${HOME}/.zrok:/home/ziggy/.zrok | |
environment: | |
PFXLOG_NO_JSON: "true" | |
command: share reserved "${ZROK_RESERVED_SHARE}" --headless | |
volumes: | |
db_data: | |
wp_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment