This file contains hidden or 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
#!/bin/bash | |
# This script updates file ownership and permissions for a WordPress installation | |
# located in the specified base directory. It ensures that the directories and files | |
# are owned by 'www-data', making them accessible for a WordPress instance running | |
# as 'www-data' inside a Docker container, while allowing the 'wc' user to edit them. | |
# | |
# The script performs the following actions: | |
# 1. Changes ownership of plugins, themes, uploads, wp-config.php, and .htaccess to 'www-data'. | |
# 2. Adds the 'wc' user to the 'www-data' group for edit permissions. |
This file contains hidden or 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
components: | |
schemas: | |
WPError: | |
properties: | |
additional_data: | |
description: Additional data of the error | |
type: any | |
additional_errors: | |
description: More errors | |
items: |
This file contains hidden or 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
openapi: 3.1.0 | |
info: | |
summary: OpenAPI for the WP/WC (basic product management). Based on the doc from the WP plug-in by Schneider & Schuetz GmbH. | |
title: wc/v3 | |
version: '1' | |
servers: | |
- url: *************************** | |
security: | |
- basicAuth: [] | |
components: |
This file contains hidden or 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
# Run as: | |
# TRAEFIK_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' traefik) docker-compose --env-file ./env/nairobi/.env -f ./marketplaces/nairobi/docker-compose.yml up -d | |
services: | |
wordpress: | |
image: wordpress:latest | |
container_name: wordpress_nairobi | |
restart: always | |
environment: | |
WORDPRESS_DB_HOST: "${MYSQL_HOST:?Please set MYSQL_HOST in .env or Docker Compose configuration.}" |
This file contains hidden or 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
services: | |
adminer: | |
image: adminer | |
container_name: adminer | |
environment: | |
- ADMINER_DEFAULT_SERVER=db_nairobi # MySQL container name on internal_nairobi network | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.adminer.rule=Host(`${ADMINER_HOST}`)" # Uses host from env file | |
- "traefik.http.routers.adminer.entrypoints=websecure" |
This file contains hidden or 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
services: | |
db_nairobi: | |
image: mysql:8.1 | |
container_name: db_nairobi | |
restart: always | |
environment: | |
MYSQL_DATABASE: ${MYSQL_DATABASE} | |
MYSQL_USER: ${MYSQL_USER} | |
MYSQL_PASSWORD: ${MYSQL_PASSWORD} | |
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} |
This file contains hidden or 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
services: | |
traefik: | |
image: traefik:v3.1.4 | |
container_name: traefik | |
restart: always | |
command: | |
- "--api.dashboard=true" | |
- "--providers.docker=true" | |
- "--providers.docker.exposedbydefault=false" | |
- "--entrypoints.web.address=:80" |
This file contains hidden or 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
#!/bin/bash | |
# How to run: | |
# curl -s https://gist.githubusercontent.com/numpde/41349ac0a295402a5171c3976b331651/raw | bash -s "PASSWORD" | |
# Check if the password is provided | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <password>" | |
exit 1 | |
fi |
This file contains hidden or 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
#!/bin/bash | |
# How-to: as root, run | |
# curl -s https://gist.githubusercontent.com/numpde/3e120f2c99f09b8852e005e33f46cb82/raw/?$(date +%s) | bash | |
# Update the package list | |
sudo apt update | |
# Install required dependencies | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common |
This file contains hidden or 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
#!/bin/bash | |
# | |
# This script configures DNS settings for OpenVPN using systemd-resolved | |
# It uses D-Bus via busctl to communicate with systemd-resolved | |
# Ensure that systemd-resolved is running before using this script. | |
# Place this script at: /etc/openvpn/update-systemd-resolved | |
# | |
# Example OpenVPN config usage: | |
# up /etc/openvpn/update-systemd-resolved | |
# down /etc/openvpn/update-systemd-resolved |