Better Docker support #277

Merged
blacklight merged 66 commits from 276/better-docker into master 2023-09-04 02:49:15 +02:00
Owner

Closes: #276

Closes: #276
A better Dockerfile.
All checks were successful
continuous-integration/drone/push Build is passing
f07b774e75
s/--config-file/--config/ option in Dockerfile.
Some checks failed
continuous-integration/drone/push Build is failing
24b04d9103
Dockerfile moved to application root
All checks were successful
continuous-integration/drone/push Build is passing
afa4de5673
If the path of the default database engine is overridden via `--workdir`
option then it won't be visible to the new `python` subprocess spawned
for Alembic.
Again, Python < 3.9 doesn't like class properties.
The database settings could also be overridden in the configuration file
besides the command line.

We should therefore pass the path to the runtime configuration file, so
the Alembic process can initialize its configuration from the same file
and use the same settings.
The new version encapsulates all the utility functions into three
classes - `Manifest`, `Manifests` and `Dependencies`.
The `logger` name may clash with the context of an action, where
`logger` may have been set to something else.
Platydock now will only print out a Dockerfile given a configuration
file.

No more maintaining the state of containers, storing separate workdirs
and configuration directories etc. - that introduced way too much
overhead over Docker.
Created `platypush/install` folder that contains:

- Dockerfiles for the supported distros
- Lists of required base dependencies for the supported distros
- Install and run scripts
- Added Debian to supported base images
If no configuration file is passed to platydock generate a minimal Dockerfile.
Some checks reported errors
continuous-integration/drone/push Build was killed
28ba042810
If the /install folder on the container doesn't contain a copy of the
source files, then the git repository will be cloned under that folder.

The user can specify via `-r/--ref` option which tag/branch/commit they
want to install.
PackageManager has both install and uninstall.
All checks were successful
continuous-integration/drone/push Build is passing
a6f8021150
Ignore the Dockerfile in the root folder
All checks were successful
continuous-integration/drone/push Build is passing
f66c4aa071
Refactored PackageManager classes.
All checks were successful
continuous-integration/drone/push Build is passing
429658e7c8
Instead of having a custom `get_installed` callable field, with
replicated code for each package manager, the field has now been
promoted to a class method containing the common logic, and the
instances now expect a `list` field (base command to list the installed
packages using the specified package manager) and a `parse_list_line`
callback field (to extract the base package name given a raw line from
the command above).

Also, we shouldn't run the list command if we're running within a Docker
context - the host and container environments will be different.
The two scripts now share the same command interface, behaviour and base
class.

Also, Platydock now builds a Docker image instead of just printing a
Dockerfile, unless the `--print` option is passed.
Added SIGTERM handler for clean termination in Docker contexts.
Some checks failed
continuous-integration/drone/push Build is failing
e6b5abe909
Always rebase when pulling from the Github remote.
Some checks failed
continuous-integration/drone/push Build is failing
ee955882bf
The master branch can move fast and easily get out of sync with the
released version.
Ignore the Dockerfile in the root folder
Some checks failed
continuous-integration/drone/push Build is failing
a87a713f5e
Try and force push the commits to Github.
All checks were successful
continuous-integration/drone/push Build is passing
867198a092
Removed the -f flag from git push.
Some checks failed
continuous-integration/drone/push Build is failing
86ce2647e4
(Try and) pull the current branch from Github instead of master.
All checks were successful
continuous-integration/drone/push Build is passing
011f6d3a66
Merge branch 'master' into 276/better-docker
All checks were successful
continuous-integration/drone/push Build is passing
1be40f30d6
Following some common UNIX conventions, if no configuration file is
specified and none exists under the default locations, then a new
configuration directory should be created under:

```
- if root: /etc/platypush
- else:
  - if XDG_CONFIG_HOME:
    - $XDG_CONFIG_HOME/platypush
  - else:
    - ~/.config/platypush
```
Updated default config.yaml.
All checks were successful
continuous-integration/drone/push Build is passing
c69f97c0a5
The new configuration:

- Enables `backend.http` by default
- Removes the extra `config.auto.yaml` dependency
- Includes many more examples, lots of updates for existing examples,
  and extensive comments.
More resilient termination logic for CommandStream.
All checks were successful
continuous-integration/drone/push Build is passing
b3c82fe0d1
blacklight deleted branch 276/better-docker 2023-09-04 02:49:15 +02:00
Sign in to join this conversation.
No description provided.