Created
July 5, 2024 17:45
-
-
Save xfathurrahman/46494d5eb33ed3adfe7b07bd1c1ed224 to your computer and use it in GitHub Desktop.
Simple Nginx Proxy Manager configuration to deploy Nginx Proxy Manager to Fly.io!
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
app = 'npm-on-fly' | |
primary_region = 'sin' # (Singapore) choose the region closest to your users | |
[build] | |
image = 'jlesage/nginx-proxy-manager:latest' | |
[env] | |
DB_MYSQL_HOST = 'your.db.host' | |
DB_MYSQL_NAME = 'db_npm' | |
DB_MYSQL_PASSWORD = 'awdkwakjdbakwbdkawbd' # You can also use a fly secret here to keep your credentials safe | |
DB_MYSQL_PORT = '3306' | |
DB_MYSQL_USER = 'fathur' # make sure your user is using mysql_native_password cuz the image doesn't support caching_sha2_password yet when I write this | |
[[mounts]] | |
source = 'npm_data' | |
destination = '/config' | |
[http_service] # This is handle both port 80 and 443 at the same time | |
internal_port = 8080 | |
force_https = true | |
auto_stop_machines = true | |
auto_start_machines = true | |
min_machines_running = 0 | |
processes = ['app'] | |
[[services]] | |
protocol = 'tcp' | |
internal_port = 8181 | |
[[services.ports]] | |
handlers = ["tls", "http"] # This is handle https and http traffic | |
port = 81 | |
[[vm]] # adjust the resources to your needs | |
memory = '1gb' | |
cpu_kind = 'shared' | |
cpus = 1 | |
# Just type `flyctl launch' and you're good to go! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment