Skip to content

Instantly share code, notes, and snippets.

@ogawa0071
Last active July 15, 2024 22:08
Show Gist options
  • Select an option

  • Save ogawa0071/b6cfcbe3096123c6493619be27514ff7 to your computer and use it in GitHub Desktop.

Select an option

Save ogawa0071/b6cfcbe3096123c6493619be27514ff7 to your computer and use it in GitHub Desktop.
WordPress and MySQL with Fly.io (ALWAYS FREE) - Bitnami Version
fly apps create ogawa0071-mysql-bitnami
fly deploy --config mysql.toml
# fly apps destroy ogawa0071-mysql-bitnami -y
fly apps create ogawa0071-wordpress-bitnami
fly deploy --config wordpress.toml
# fly apps destroy ogawa0071-wordpress-bitnami -y
FROM bitnami/mariadb
USER root # https://github.com/bitnami/containers/blob/main/bitnami/mariadb/README.md#why-use-a-non-root-container
app = "ogawa0071-mysql-bitnami"
primary_region = "nrt"
swap_size_mb = 512
[build]
dockerfile = "mysql.Dockerfile"
[env]
# https://github.com/bitnami/containers/blob/main/bitnami/mariadb/README.md#configuration
ALLOW_EMPTY_PASSWORD = "yes"
MARIADB_USER = "exampleuser"
MARIADB_PASSWORD = "examplepass"
MARIADB_DATABASE = "exampledb"
MARIADB_BIND_ADDRESS = "*" # For IPv6
[mounts]
source = "ogawa0071_mysql_bitnami"
destination = "/bitnami/mariadb"
initial_size = "1GB"
[[vm]]
size = "shared-cpu-1x"
FROM bitnami/wordpress
USER root # https://github.com/bitnami/containers/blob/main/bitnami/wordpress/README.md#why-use-a-non-root-container
app = "ogawa0071-wordpress-bitnami"
primary_region = "nrt"
swap_size_mb = 512
[build]
dockerfile = "wordpress.Dockerfile"
[env]
# https://github.com/bitnami/containers/blob/main/bitnami/wordpress/README.md#configuration
ALLOW_EMPTY_PASSWORD = "yes"
WORDPRESS_DATABASE_HOST = "ogawa0071-mysql-bitnami.internal"
WORDPRESS_DATABASE_USER = "exampleuser"
WORDPRESS_DATABASE_PASSWORD = "examplepass"
WORDPRESS_DATABASE_NAME = "exampledb"
WORDPRESS_SKIP_BOOTSTRAP = "yes"
WORDPRESS_ENABLE_HTTPS = "yes"
WORDPRESS_ENABLE_REVERSE_PROXY = "yes"
# https://github.com/bitnami/containers/blob/main/bitnami/php-fpm/README.md#configuration
# PHP_MEMORY_LIMIT = "256M"
# PHP_POST_MAX_SIZE = "128M"
# PHP_UPLOAD_MAX_FILESIZE = "128M"
[http_service]
internal_port = 8080
[mounts]
source = "ogawa0071_wordpress_bitnami"
destination = "/bitnami/wordpress"
initial_size = "1GB"
[[vm]]
size = "shared-cpu-1x"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment