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

Proposal: Add a Fly.io deplyoment #4

Open
gedw99 opened this issue Apr 16, 2023 · 3 comments
Open

Proposal: Add a Fly.io deplyoment #4

gedw99 opened this issue Apr 16, 2023 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Apr 16, 2023

Needs a docker file

then can use flyctl to deploy to Fly.io.

then can run on many data centers and all requests will load balance.

@gedw99
Copy link
Author

gedw99 commented Apr 16, 2023

fly can act as the docker registry too btw.

takes 300 ms to doot a docker on fly. But you cant use docker compose. Only docker..

Any DB we need should be postresql or cockroach. then you get free master / master replication only fly.io ... Saves your tons of time...

@gedw99
Copy link
Author

gedw99 commented Apr 16, 2023



fly-db-create:
	# works :)
	# feed it the vars i want ( using everything but snapshot size)
	flyctl postgres create --name $(FLY_DB_APP_NAME) \
		--organization $(FLY_DB_ORG_NAME) \
		--password $(FLY_DB_PASSWORD) \
		--region $(FLY_DB_REGION_NAME) \
		--initial-cluster-size $(FLY_DB_CLUSTER_INIT_SIZE) \
		--vm-size $(FLY_DB_VM_SIZE) \
		--volume-size $(FLY_DB_VOLUME_SIZE) \

fly-db-create-rpl:
	# works :)
	# walk through.. 
	flyctl postgres create
	# then save in the makefile vars or .env

fly-db-enums:
	# works :)
	# list of regions
	flyctl platform regions

	# list of vm sizes
	flyctl platform vm-sizes

fly-db-status-enums:
	# works :)
	# just opens the web url for global status
	flyctl platform status

	

fly-db-create-delete:
	# works :)
	# its itself an app. will ask for confirm 
	flyctl apps destroy $(FLY_DB_APP_NAME)



fly-db-status:
	# works :)
	flyctl status -a $(FLY_DB_APP_NAME)
fly-db-users:
	flyctl postgres users list $(FLY_DB_HOST_NAME) --app $(FLY_DB_APP_NAME)

fly-db-rpl:
	# from a wireguard tunnel
	psql postgres://postgres:secret123@appname.internal:**5432**

fly-db-attach:
	flyctl postgres attach --postgres-app mypostgres
fly-db-deattach:
	flyctl postgres detach -a $(FLY_DB_APP_NAME) --postgres-app postgres-app-name



fly-db-databases-list:
	flyctl postgres db list $(FLY_DB_HOST_NAME) -a $(FLY_DB_APP_NAME)

@melvincarvalho
Copy link
Contributor

I signed up for fly.io (without a credit card tho) and tried to deploy the server, but didnt seem to manage it. Im not too sure how fly works or how to create a docker image. But I've tested the Dockerfile locally and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants