| 1 | package Langertha::Knarr::CLI::Cmd::Container; | ||
| 2 | 37 | our $VERSION = '1.102'; | |
| 3 | # ABSTRACT: Alias for 'knarr start --from-env -p 8080 -p 11434' (Docker mode) | ||
| 4 | 37 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 37 | ▶ | use MooX::Cmd; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 37 | ▶ | use MooX::Options protect_argv => 0, usage_string => 'USAGE: knarr container [options]'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 37 | ▶ | use Langertha::Knarr::CLI::Cmd::Start; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | 2 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 11 | 2 | my ($self, $args, $chain) = @_; | |
| 12 | 2 | print STDERR "[knarr] NOTE: 'knarr container' is now 'knarr start --from-env -p 8080 -p 11434'\n"; | |
| 13 | 2 | $self->start_command->execute($args, $chain); | |
| 14 | } | ||
| 15 | |||
| 16 | # The start command this alias runs: the Docker image's own (k46). | ||
| 17 | 2 | ▶ | sub start_command { |
|
Subroutine
start_command: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 2 | my ($self) = @_; | |
| 19 | 2 | return Langertha::Knarr::CLI::Cmd::Start->new( | |
| 20 | from_env => 1, | ||
| 21 | host => '0.0.0.0', | ||
| 22 | port => [ 8080, 11434 ], | ||
| 23 | ); | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | 37 | 1; | |
| 28 | |||
| 29 | __END__ | ||
| 30 | |||
| 31 | =pod | ||
| 32 | |||
| 33 | =encoding UTF-8 | ||
| 34 | |||
| 35 | =head1 NAME | ||
| 36 | |||
| 37 | Langertha::Knarr::CLI::Cmd::Container - Alias for 'knarr start --from-env -p 8080 -p 11434' (Docker mode) | ||
| 38 | |||
| 39 | =head1 VERSION | ||
| 40 | |||
| 41 | version 1.102 | ||
| 42 | |||
| 43 | =head1 DESCRIPTION | ||
| 44 | |||
| 45 | Deprecated alias for C<knarr start --from-env -p 8080 -p 11434>, the | ||
| 46 | Docker image's own command. Kept for backwards compatibility with existing | ||
| 47 | Docker setups that still run C<knarr container>. It takes no options of its | ||
| 48 | own (C<-p> and the other C<start> options are refused; the global | ||
| 49 | C<-c>/C<-v> before the subcommand still apply) and always listens on | ||
| 50 | C<0.0.0.0:8080> and C<0.0.0.0:11434>. For other ports use | ||
| 51 | C<knarr start --from-env -p ...>. | ||
| 52 | |||
| 53 | =head2 start_command | ||
| 54 | |||
| 55 | my $start = $container->start_command; | ||
| 56 | |||
| 57 | The L<Langertha::Knarr::CLI::Cmd::Start> object C<execute> runs: | ||
| 58 | C<--from-env> on C<0.0.0.0> ports C<8080> and C<11434>, with the worker | ||
| 59 | count of the config's C<workers:> or C<KNARR_WORKERS>. | ||
| 60 | |||
| 61 | =head1 SUPPORT | ||
| 62 | |||
| 63 | =head2 Issues | ||
| 64 | |||
| 65 | Please report bugs and feature requests on GitHub at | ||
| 66 | L<https://github.com/Getty/langertha-knarr/issues>. | ||
| 67 | |||
| 68 | =head2 IRC | ||
| 69 | |||
| 70 | Join C<#langertha> on C<irc.perl.org> or message Getty directly. | ||
| 71 | |||
| 72 | =head1 CONTRIBUTING | ||
| 73 | |||
| 74 | Contributions are welcome! Please fork the repository and submit a pull request. | ||
| 75 | |||
| 76 | =head1 AUTHOR | ||
| 77 | |||
| 78 | Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/> | ||
| 79 | |||
| 80 | =head1 COPYRIGHT AND LICENSE | ||
| 81 | |||
| 82 | This software is copyright (c) 2026 by Torsten Raudssus. | ||
| 83 | |||
| 84 | This is free software; you can redistribute it and/or modify it under | ||
| 85 | the same terms as the Perl 5 programming language system itself. | ||
| 86 | |||
| 87 | =cut | ||