can3p / pcom

Private social network meant to enforce real human connections
Apache License 2.0
0 stars 0 forks source link

make file adjustments? #1

Open gedw99 opened 2 months ago

gedw99 commented 2 months ago

create and teardown all on fly.

works from here...

so its easy for users.

want to add to the make file ?

we can built it up ...


FLY_NAME=flyctl

FLY_APP_NAME=gedw99-$(MAIN_NAME)
FLY_DB_NAME=gedw99-$(MAIN_NAME)-db
FLY_CERT_NAME=$(MAIN_NAME).example.net

fly-create:
    $(FLY_NAME) apps create $(FLY_APP_NAME)
    $(FLY_NAME) postgres create -n $(FLY_DB_NAME)
    $(FLY_NAME) postgres attach -a $(FLY_APP_NAME) $(FLY_DB_NAME)

    $(FLY_NAME) secrets set TEST=tets-value
    #$(FLY_NAME) secrets set SESSION_SALT=<random string>
    #$(FLY_NAME) secrets set SITE_ROOT=https://pcom.com
    #$(FLY_NAME) secrets set MJ_APIKEY_PUBLIC=<public key from mailjet>
    #$(FLY_NAME) secrets set MJ_APIKEY_PRIVATE=<private key from mailjet>

    # https://fly.io/dashboard#
    # https://fly.io/apps/gedw99-galene
    # https://fly.io/apps/gedw99-galene-db
fly-create-del:
    # check dbs to App Mapping
    $(FLY_NAME) postgres db list --app $(FLY_DB_NAME)
    # delete Mapping of App to db
    $(FLY_NAME) postgres detach $(FLY_DB_NAME)

    # del the db
    $(FLY_NAME) apps destroy $(FLY_DB_NAME)

    # check the apps
    $(FLY_NAME) apps list
    # del app
    $(FLY_NAME) apps delete $(FLY_APP_NAME)
can3p commented 2 months ago

Good idea, I think we can add it to the template in gogo-cli

gedw99 commented 2 months ago

👌

gedw99 commented 2 months ago

Question

can we regen without stomping on all the code in icon ? I assume not ?

I wrote generators for db level and api level on a few projects , go go-cli is really a scaffolder .

Sql boiler is the generator .

If you could add to the readme to explain there aspects it would be good