{"id":20698203,"url":"https://github.com/fly-apps/hello_elixir_sqlite","last_synced_at":"2025-04-22T21:45:50.416Z","repository":{"id":104277595,"uuid":"449699159","full_name":"fly-apps/hello_elixir_sqlite","owner":"fly-apps","description":"An example for building and deploying an Elixir application to Fly using a Dockerfile and SQLite!","archived":false,"fork":false,"pushed_at":"2022-07-19T17:09:20.000Z","size":259,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T19:11:14.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fly-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-19T13:17:53.000Z","updated_at":"2025-03-19T09:26:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"0871cda9-4c30-4451-b905-461960b2be01","html_url":"https://github.com/fly-apps/hello_elixir_sqlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fhello_elixir_sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fhello_elixir_sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fhello_elixir_sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fhello_elixir_sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fly-apps","download_url":"https://codeload.github.com/fly-apps/hello_elixir_sqlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250330588,"owners_count":21413003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T00:23:27.548Z","updated_at":"2025-04-22T21:45:50.407Z","avatar_url":"https://github.com/fly-apps.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello Elixir SQLite!\n\nWelcome to our Code Server for Phoenix Apps.\n\n## Development\n\nRight now this editor is running at ${FLY_CODE_URL}. \n\nYou need to start the development server to see yout app running at ${FLY_DEVELOPMENT_URL}.\n\n```sh\nmix phx.server\n```\n\n## Deploy\n\nLooks like we're ready to deploy!\n\nTo deploy you just need to run `fly launch --no-deploy`, create your secret key and create a volume. \n\nRun `fly launch --no-deploy` and make sure to say yes to copy the configuration file \nto the new app so you wont have to do anything.\n\n```sh\n$ fly launch --no-deploy\nAn existing fly.toml file was found for app fly-elixir\n\n? Would you like to copy its configuration to the new app? Yes\nCreating app in /home/coder/project\nScanning source code\nDetected a Dockerfile app\n\n? App Name (leave blank to use an auto-generated name): your-app-name\n\n? Select organization: Lubien (personal)\n\n? Select region: gru (São Paulo)\n\nCreated app sqlite-tests in organization personal\nWrote config file fly.toml\nYour app is ready. Deploy with `flyctl deploy`\n```\n\nLet's got create your secret key. Elixir has a mix task that can generate a new \nPhoenix key base secret. Let's use that.\n\n```bash\nmix phx.gen.secret\n```\n\nIt generates a long string of random text. Let's store that as a secret for our app. \nWhen we run this command in our project folder, `flyctl` uses the `fly.toml` \nfile to know which app we are setting the value on.\n\n```sh\n$ fly secrets set SECRET_KEY_BASE=\u003cGENERATED\u003e\nSecrets are staged for the first deployment\n```\n\nNow time to create a volume for your SQLite database. You will need to run\n`fly volumes create database_data --region REGION_NAME`. Pick the same region\nyou chose on the previous command.\n\n```sh\n$ fly volumes create database_data --size 1 --region gru\n        ID: vol_1g67340g9y9rydxw\n      Name: database_data\n       App: sqlite-tests\n    Region: gru\n      Zone: 2824\n   Size GB: 1\n Encrypted: true\nCreated at: 18 Jan 22 11:18 UTC\n```\n\nNow go for the deploy!\n\n```sh\n$ fly deploy\n```\n\n... will bring up your app!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fhello_elixir_sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffly-apps%2Fhello_elixir_sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fhello_elixir_sqlite/lists"}