Add an app
An app is one repository, or one folder of a repository, deployed to one server.
Start
Choose Add an app on the fleet page, on a server's page, on a project's page or from search. If more than one server could run the app, pick one.
Pick the repository
Under Source:
- Your GitHub account lists the repositories the Coresmith GitHub app can read. Pick one, and its default branch fills in. If the list is empty, connect GitHub first.
- A Git URL takes any repository's address. Use the HTTPS address of a public repository, or the SSH address of a private one. Deploy from any Git host covers the key a private repository needs.
If the repository holds several apps in folders, a Folder field lists them. Pick the app's folder, and Coresmith reads that one.
Check the stack
Coresmith reads the repository and fills in the stack: the language, the framework, the runtime and its version, and the web root for apps that serve files. Under each field it says where the answer came from, such as composer.json or .nvmrc. For a static site with a build step, it also says which tool builds it.
- A field that reads Pick one means the repository leaves the choice open. Choose the right option before you add the app.
- When something would stop the deploy, such as a start script that runs a development server, the form says so and what to change in the repository.
Supported stacks lists what Coresmith reads for each language.
Pick a database
The Database and Redis fields decide what the app connects to:
- New PostgreSQL database, New MySQL database or New Redis database creates one on the server, named after the app.
- A database already on the server, listed by name, connects the app to it.
- SQLite, kept across deploys, for Laravel apps, keeps every SQLite file in the app's
databasefolder between releases, withDB_DATABASEpointing at the keptdatabase.sqlite. - None, I'll set it up myself leaves the connection to you.
If the repository has a .env.example, Coresmith picks from it. DB_CONNECTION=pgsql picks a new PostgreSQL database and mysql a new MySQL one. A cache, queue or session store set to redis picks a new Redis. The note under each field names the setting it came from.
For an app that requires laravel/horizon, Coresmith picks a new Redis too, since Horizon runs its queue on Redis. Whichever Redis the app gets, Coresmith also sets QUEUE_CONNECTION to redis, and turns the app's queue worker on, so its jobs run from the first deploy. A Laravel app that schedules work in routes/console.php, its console kernel or bootstrap/app.php starts with its scheduler on too.
Coresmith puts the connection in the app's variables, with the real port and password. Set environment variables shows which names it uses.
Fill in the rest
- Name. Filled in from the repository until you type your own. With a default domain, the name is also the app's address, so Coresmith asks for another name if a different app already has that address. You can rename the app later.
- Domain. Optional. With a default domain, the line under it shows the address the app gets without one, such as
shop-front.apps.example.com. If the default domain doesn't reach that server yet, the line says so, with a link to the card. Without a default domain, an app with no domain has no web address until you add one, and owners and admins get a link to set one up. You can add domains later too. Under it, Coresmith shows the DNS records that point the domain at the server. If visitors can't reach the server over IPv4 yet, it says so, and Bring IPv4 visitors in opens the server's Network tab in a new tab, so the form keeps what you typed. Once IPv4 visitors can get in, Coresmith points the domain for you if its Cloudflare token covers it. - Size. How much memory each of the app's processes can use. Sizes and PHP limits.
- Project. Optional. Group apps with projects and tags.
- Tags. Optional. Short labels such as
productionor a client's name. Press Enter after each one.
Choose Add the app. Nothing deploys until you choose Deploy on the app's page. Deploy and roll back.