Deploy your code
Put an application online from a GitHub or GitLab repository, built on every push by Fransys continuous integration.
How it works
Section titled “How it works”Fransys builds your application’s Docker image on every push, then deploys it. To do this, it opens a merge request on your repository that adds its pipeline. Your code isn’t changed.
You need a project attached to a cluster. If you don’t have one yet, start with the First deployment.
The steps
Section titled “The steps”-
Add the service
In the project, click Add a service, then Application. Fransys prepares its settings in one to two minutes.
-
Choose the code origin
In the service panel, set the code origin to GitHub or GitLab. Click Link GitHub (or GitLab) if your account isn’t linked yet, then pick the repository and the branch.
-
Connect continuous integration
Click Connect CI, then Create the merge request. On your repository:
- follow the instructions in the merge request;
- merge it;
- wait for the pipeline to finish: your latest commit then shows up in the service.
Fransys adds its own CI files without touching what’s already there, plus a few variables prefixed with
FRANSYS_in the repository. -
Tell Fransys how to start the application
The Tell Fransys how to start your application guide asks for three things:
- The port your application listens on;
- Its variables: application key, database access, email…;
- Its neighbours: database, cache, queues.
The easiest way is to ask your agent (see below). Otherwise, do it by hand: set the container port, import your
.env.exampleinto the variables, and add the linked databases. -
Deploy
Click Deploy. See Deploy and monitor.
Let your agent prepare it
Section titled “Let your agent prepare it”Open your agent in the repository folder and give it the instruction the guide suggests (the Copy the instruction button). The agent reads the Dockerfile, the docker-compose file and the .env.example, then prepares a plan: port, variables, databases to add and link. Nothing changes without your go-ahead: you review the plan in the console before running it. See Plans.
For other processes (queues, websockets), the agent copies the service and picks its role with an environment variable: Fransys doesn’t let you change the container command. For scheduled jobs, it uses a recurring command.
Build-time variables
Section titled “Build-time variables”Variables read at build time (for example VITE_…) aren’t passed on by Fransys CI yet. Keep them in your code, or read them when the application starts.