From a docker-compose file
Translate a docker-compose file into Fransys services: every entry, every setting, in its place.
How things map
Section titled “How things map”In docker-compose.yml | On Fransys |
|---|---|
a service with build: | an Application from your repository, with the CI |
a service with image: | an Application as an External image |
postgres, mysql, mariadb, redis | a managed database, linked to the applications |
ports: | the Container port (the internal one, on the right) |
environment: or env_file: | Variables, by importing the .env file |
depends_on: | a link between the services |
volumes: (data) | a volume in Storage |
command: | no command override: a role read by the entrypoint |
| a cron container | a scheduled task |
Databases
Section titled “Databases”Don’t copy the compose file’s database container: add a managed database. It’s backed up, and its credentials arrive in the linked application’s variables. Adapt the names (DB_HOST…) by renaming the received variables, or with references. See Linking services.
Hostnames
Section titled “Hostnames”In the compose file, an application reaches the database by the service name (db). On Fransys, use the host variable received through the link, not a hard-coded name.
The quickest way: your agent
Section titled “The quickest way: your agent”Open the agent in the repository folder and ask it: “Read the docker-compose file and prepare the equivalent Fransys plan in the shop project.” It adds the services, databases, links and variables in a plan, which you review.