Create your first GipOps Compose file
Time Required
30 Minutes
Difficulty
Low
Create your first Compose file
In this example, we're going to massage the LinuxServer.io's Ombi image to match our best practices, per below
Create your Compose file
Open your GitHub repo and enter the docker-compose folder
Click on 'Add file' > 'Create new file'
Name the file 'ombi.yml', and copy the compose file from here It should look something like this:
Refer to the best practices and tips documentation below and edit the file
Hit 'Commit changes...'
hit 'Commit changes'
Oh, you want me to give you the answer to step 4?
As of writing, here is the ombi.yml compose file
Here is my tweaked file
Best Practices and tips
Variables
To keep your compose files as system agnostic as possible, its best to use variables where you can. Some suggestions are
Ports (eg $HTTP_PORT, $DB_PORT, $API_PORT)
Mounted volumes (eg $CONFIG, $DATA)
Timezones (eg $TZ)
These variables can then be set in Portainer when creating the stack
Don't name containers unless there is a requirement for it
Some compose files may name a database 'db', which will then block you from using that name anywhere else. Its best to let Portainer manage names of containers.
Container Image versioning
Do not use the 'latest' tag, as it does not allow Renovate to update the compose file
When versioning your compose files, locate the 'latest' tag on the DockerHub, GitHub etc and use the relevant version number.
This is harder to do on DockerHub. Per the screenshot below, we've located the 'tatest' tag and used the Digest to locate the correct version.
Container Image locations
As Docker has now started rate limiting non-paying users, a lot of container creators are putting their containers on GitHub or other services
Its quite easy to figure out if a container exists on GitHub;
If the 'Packages' option exists, the container is on GitHub\
The container URL is underlined\
Last updated