Compare commits
2 Commits
0.11.0-bet
...
fix/647
Author | SHA1 | Date | |
---|---|---|---|
367fff60ea
|
|||
c92a0d0703 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
/kadabra
|
||||
dist/
|
||||
tests/integration/.bats
|
||||
/bin
|
||||
|
10
Makefile
10
Makefile
@ -78,14 +78,20 @@ update-po:
|
||||
done
|
||||
|
||||
.PHONY: update-pot
|
||||
update-pot:
|
||||
@xgettext-go \
|
||||
update-pot: ./bin/xgettext-go
|
||||
@./bin/xgettext-go \
|
||||
-o pkg/i18n/locales/$(DOMAIN).pot \
|
||||
--keyword=i18n.G \
|
||||
--keyword-ctx=i18n.GC \
|
||||
--sort-output \
|
||||
--add-comments-tag="translators" \
|
||||
$$(find . -name "*.go" -not -path "*vendor*" | sort)
|
||||
|
||||
./bin/xgettext-go:
|
||||
@mkdir -p ./bin && \
|
||||
wget -O ./bin/xgettext-go https://git.coopcloud.tech/toolshed/xgettext-go/raw/branch/main/xgettext-go && \
|
||||
chmod +x ./bin/xgettext-go
|
||||
|
||||
.PHONY: update-pot-po-metadata
|
||||
update-pot-po-metadata:
|
||||
@sed -i "s/charset=CHARSET/charset=UTF-8/g" pkg/i18n/locales/*.po pkg/i18n/locales/*.pot
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
// translators: `abra app` aliases. use a comma separated list of aliases with
|
||||
// no spaces in between
|
||||
var appAliases = i18n.G("a")
|
||||
var appAliases = i18n.GC("a", "abra app")
|
||||
|
||||
var AppCommand = &cobra.Command{
|
||||
// translators: `app` command group
|
||||
|
@ -268,7 +268,7 @@ func init() {
|
||||
AppBackupListCommand.Flags().BoolVarP(
|
||||
&showAllPaths,
|
||||
i18n.G("all"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "app backup"),
|
||||
false,
|
||||
i18n.G("show all paths"),
|
||||
)
|
||||
|
@ -166,7 +166,7 @@ func init() {
|
||||
AppRestartCommand.Flags().BoolVarP(
|
||||
&allServices,
|
||||
i18n.G("all-services"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "app restart"),
|
||||
false,
|
||||
i18n.G("restart all services"),
|
||||
)
|
||||
|
@ -574,7 +574,7 @@ func init() {
|
||||
AppSecretGenerateCommand.Flags().BoolVarP(
|
||||
&generateAllSecrets,
|
||||
i18n.G("all"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "app secret generate"),
|
||||
false,
|
||||
i18n.G("generate all secrets"),
|
||||
)
|
||||
@ -614,7 +614,7 @@ func init() {
|
||||
AppSecretRmCommand.Flags().BoolVarP(
|
||||
&rmAllSecrets,
|
||||
i18n.G("all"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "app secret rm"),
|
||||
false,
|
||||
i18n.G("remove all secrets"),
|
||||
)
|
||||
|
@ -119,7 +119,7 @@ func init() {
|
||||
RecipeFetchCommand.Flags().BoolVarP(
|
||||
&fetchAllRecipes,
|
||||
i18n.G("all"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "recipe fetch"),
|
||||
false,
|
||||
i18n.G("fetch all recipes"),
|
||||
)
|
||||
|
@ -381,7 +381,7 @@ func init() {
|
||||
RecipeUpgradeCommand.Flags().BoolVarP(
|
||||
&allTags,
|
||||
i18n.G("all-tags"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "recipe upgrade"),
|
||||
false,
|
||||
i18n.G("list all tags, not just upgrades"),
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
// translators: `abra server add` aliases. use a comma separated list of
|
||||
// aliases with no spaces in between
|
||||
var serverAddAliases = i18n.G("a")
|
||||
var serverAddAliases = i18n.GC("a", "server add")
|
||||
|
||||
var ServerAddCommand = &cobra.Command{
|
||||
// translators: `server add` command
|
||||
|
@ -96,7 +96,7 @@ func init() {
|
||||
ServerPruneCommand.Flags().BoolVarP(
|
||||
&allFilter,
|
||||
i18n.G("all"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "server prune"),
|
||||
false,
|
||||
i18n.G("remove all unused images"),
|
||||
)
|
||||
|
@ -551,7 +551,7 @@ func init() {
|
||||
UpgradeCommand.Flags().BoolVarP(
|
||||
&updateAll,
|
||||
i18n.G("all"),
|
||||
i18n.G("a"),
|
||||
i18n.GC("a", "abra upgrade"),
|
||||
false,
|
||||
i18n.G("update all deployed apps"),
|
||||
)
|
||||
|
@ -20,6 +20,7 @@ var (
|
||||
Locale = DefaultLocale
|
||||
_, Mo = LoadLocale()
|
||||
G = Mo.Get
|
||||
GC = Mo.GetC
|
||||
)
|
||||
|
||||
func LoadLocale() (string, *gotext.Mo) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
msgid ""
|
||||
msgstr "Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-09-10 21:44+0200\n"
|
||||
"POT-Creation-Date: 2025-09-28 12:38+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -1668,9 +1668,55 @@ msgstr ""
|
||||
|
||||
#. translators: `abra app` aliases. use a comma separated list of aliases with
|
||||
#. no spaces in between
|
||||
#: ./cli/app/app.go:12
|
||||
msgctxt "abra app"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/backup.go:271
|
||||
msgctxt "app backup"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/restart.go:169
|
||||
msgctxt "app restart"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/secret.go:577
|
||||
msgctxt "app secret generate"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/secret.go:617
|
||||
msgctxt "app secret rm"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/fetch.go:122
|
||||
msgctxt "recipe fetch"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/upgrade.go:384
|
||||
msgctxt "recipe upgrade"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#. translators: `abra server add` aliases. use a comma separated list of
|
||||
#. aliases with no spaces in between
|
||||
#: ./cli/app/app.go:12 ./cli/app/backup.go:271 ./cli/app/restart.go:169 ./cli/app/secret.go:577 ./cli/app/secret.go:617 ./cli/recipe/fetch.go:122 ./cli/recipe/upgrade.go:384 ./cli/server/add.go:23 ./cli/server/prune.go:99 ./cli/updater/updater.go:554
|
||||
#: ./cli/server/add.go:23
|
||||
msgctxt "server add"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/server/prune.go:99
|
||||
msgctxt "server prune"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/updater/updater.go:554
|
||||
msgctxt "abra upgrade"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-09-10 21:44+0200\n"
|
||||
"POT-Creation-Date: 2025-09-28 12:38+0200\n"
|
||||
"PO-Revision-Date: 2025-09-04 08:14+0000\n"
|
||||
"Last-Translator: chasqui <chasqui@cryptolab.net>\n"
|
||||
"Language-Team: Spanish <https://translate.coopcloud.tech/projects/co-op-"
|
||||
@ -1695,19 +1695,19 @@ msgid ""
|
||||
"\n"
|
||||
"Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "
|
||||
"\"help\"))}}\n"
|
||||
" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}"
|
||||
"{{if .HasAvailableLocalFlags}}\n"
|
||||
" {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if ."
|
||||
"HasAvailableLocalFlags}}\n"
|
||||
"\n"
|
||||
"Flags:\n"
|
||||
"{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}"
|
||||
"{{if .HasAvailableInheritedFlags}}\n"
|
||||
"{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if ."
|
||||
"HasAvailableInheritedFlags}}\n"
|
||||
"\n"
|
||||
"Global Flags:\n"
|
||||
"{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}"
|
||||
"{{if .HasHelpSubCommands}}\n"
|
||||
"{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if ."
|
||||
"HasHelpSubCommands}}\n"
|
||||
"\n"
|
||||
"Additional help topics:{{range .Commands}}"
|
||||
"{{if .IsAdditionalHelpTopicCommand}}\n"
|
||||
"Additional help topics:{{range .Commands}}{{if ."
|
||||
"IsAdditionalHelpTopicCommand}}\n"
|
||||
" {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}"
|
||||
"{{if .HasAvailableSubCommands}}\n"
|
||||
"\n"
|
||||
@ -1829,12 +1829,55 @@ msgstr ""
|
||||
|
||||
#. translators: `abra app` aliases. use a comma separated list of aliases with
|
||||
#. no spaces in between
|
||||
#: cli/app/app.go:12
|
||||
msgctxt "abra app"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/app/backup.go:271
|
||||
msgctxt "app backup"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/app/restart.go:169
|
||||
msgctxt "app restart"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/app/secret.go:577
|
||||
msgctxt "app secret generate"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/app/secret.go:617
|
||||
msgctxt "app secret rm"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/recipe/fetch.go:122
|
||||
msgctxt "recipe fetch"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/recipe/upgrade.go:384
|
||||
msgctxt "recipe upgrade"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#. translators: `abra server add` aliases. use a comma separated list of
|
||||
#. aliases with no spaces in between
|
||||
#: cli/app/app.go:12 cli/app/backup.go:271 cli/app/restart.go:169
|
||||
#: cli/app/secret.go:577 cli/app/secret.go:617 cli/recipe/fetch.go:122
|
||||
#: cli/recipe/upgrade.go:384 cli/server/add.go:23 cli/server/prune.go:99
|
||||
#: cli/server/add.go:23
|
||||
msgctxt "server add"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/server/prune.go:99
|
||||
msgctxt "server prune"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
#: cli/updater/updater.go:554
|
||||
msgctxt "abra upgrade"
|
||||
msgid "a"
|
||||
msgstr ""
|
||||
|
||||
@ -4910,8 +4953,8 @@ msgstr ""
|
||||
#: cli/recipe/upgrade.go:228
|
||||
#, c-format
|
||||
msgid ""
|
||||
"service %s is at version %s, but pinned to %s, please correct your "
|
||||
"compose.yml file manually!"
|
||||
"service %s is at version %s, but pinned to %s, please correct your compose."
|
||||
"yml file manually!"
|
||||
msgstr ""
|
||||
|
||||
#: cli/recipe/upgrade.go:224
|
||||
|
5
scripts/cloud-init/README.md
Normal file
5
scripts/cloud-init/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# cloud-init
|
||||
|
||||
This folder contains cloud-init files for installing Abra and its dependencies.
|
||||
|
||||
For more information, see <https://cloudinit.readthedocs.io/en/latest/index.html>
|
49
scripts/cloud-init/cloud-init.yaml
Normal file
49
scripts/cloud-init/cloud-init.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
#cloud-config
|
||||
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
package_reboot_if_required: true
|
||||
|
||||
# https://packages.debian.org/bookworm/docker.io
|
||||
packages:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- docker.io
|
||||
- docker-compose
|
||||
# https://stackoverflow.com/a/74084180
|
||||
- apparmor
|
||||
|
||||
# https://docs.coopcloud.tech/operators/tutorial/#server-setup
|
||||
runcmd:
|
||||
- curl -fsSL https://install.abra.coopcloud.tech | env HOME=/root bash
|
||||
- docker swarm init
|
||||
- docker network create -d overlay proxy
|
||||
|
||||
write_files:
|
||||
# Add abra to PATH and set EDITOR
|
||||
- path: /etc/profile.d/custom_path.sh
|
||||
content: |
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
export EDITOR=vim
|
||||
owner: root:root
|
||||
permissions: '0755'
|
||||
# Send container log to journald: https://docs.coopcloud.tech/operators/handbook/#how-do-i-persist-container-logs-after-they-go-away
|
||||
- path: /etc/docker/daemon.json
|
||||
content: |
|
||||
{
|
||||
"log-driver": "journald",
|
||||
"log-opts": {
|
||||
"labels":"com.docker.swarm.service.name"
|
||||
}
|
||||
}
|
||||
owner: root:root
|
||||
permissions: '0644'
|
||||
# Rotate logs
|
||||
- path: /etc/systemd/journald.conf
|
||||
content: |
|
||||
[Journal]
|
||||
Storage=persistent
|
||||
SystemMaxUse=5G
|
||||
MaxFileSec=1month
|
||||
owner: root:root
|
||||
permissions: '0644'
|
Reference in New Issue
Block a user