Skip to content

Commit 7200384

Browse files
Dunky13claude
andcommitted
Floci: add ct and install scripts
Builds Floci (local AWS emulator) from the release tarball with Temurin 25 and Maven, since releases carry no standalone binary yet (floci-io/floci#5767). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Marc Went <marc@went.io>
1 parent f3ca947 commit 7200384

3 files changed

Lines changed: 184 additions & 0 deletions

File tree

‎ct/floci.sh‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/env bash
2+
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main"
3+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
4+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
5+
# Copyright (c) 2021-2026 community-scripts ORG
6+
# Author: Marc Went (Dunky13)
7+
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
8+
# Source: https://github.com/floci-io/floci
9+
10+
APP="Floci"
11+
var_tags="${var_tags:-aws;developer;testing}"
12+
var_cpu="${var_cpu:-2}"
13+
var_ram="${var_ram:-3072}"
14+
var_disk="${var_disk:-6}"
15+
var_os="${var_os:-debian}"
16+
var_version="${var_version:-13}"
17+
var_arm64="${var_arm64:-yes}"
18+
var_unprivileged="${var_unprivileged:-1}"
19+
20+
header_info "$APP"
21+
variables
22+
color
23+
catch_errors
24+
25+
function update_script() {
26+
header_info
27+
check_container_storage
28+
check_container_resources
29+
30+
if [[ ! -d /opt/floci ]]; then
31+
msg_error "No ${APP} Installation Found!"
32+
exit
33+
fi
34+
35+
if check_for_gh_release "floci" "floci-io/floci"; then
36+
msg_info "Stopping Floci"
37+
systemctl stop floci
38+
msg_ok "Stopped Floci"
39+
40+
JAVA_VERSION="25" setup_java
41+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "floci" "floci-io/floci" "tarball"
42+
43+
msg_info "Building Floci"
44+
cd /opt/floci
45+
$STD mvn -B clean package -Dmaven.test.skip=true
46+
rm -rf ~/.m2
47+
msg_ok "Built Floci"
48+
49+
msg_info "Starting Floci"
50+
systemctl start floci
51+
msg_ok "Started Floci"
52+
msg_ok "Updated successfully!"
53+
fi
54+
exit
55+
}
56+
57+
start
58+
build_container
59+
description
60+
61+
msg_ok "Completed Successfully!\n"
62+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
63+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
64+
echo -e "${GATEWAY}${BGN}http://${IP}:4566${CL}"

‎install/floci-install.sh‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Marc Went (Dunky13)
5+
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
6+
# Source: https://github.com/floci-io/floci
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
JAVA_VERSION="25" setup_java
17+
18+
# after setup_java, so Temurin satisfies maven's Java dependency instead of pulling in OpenJDK
19+
msg_info "Installing Dependencies"
20+
$STD apt install -y maven
21+
msg_ok "Installed Dependencies"
22+
23+
fetch_and_deploy_gh_release "floci" "floci-io/floci" "tarball"
24+
25+
msg_info "Building Floci"
26+
cd /opt/floci
27+
$STD mvn -B clean package -Dmaven.test.skip=true
28+
rm -rf ~/.m2
29+
msg_ok "Built Floci"
30+
31+
msg_info "Configuring Floci"
32+
mkdir -p /opt/floci_data
33+
cat <<EOF >/opt/floci_data/.env
34+
QUARKUS_HTTP_HOST=0.0.0.0
35+
FLOCI_SECURITY_ALLOW_UNSAFE_NETWORK_EXPOSURE=true
36+
FLOCI_BASE_URL=http://${LOCAL_IP}:4566
37+
FLOCI_STORAGE_MODE=persistent
38+
FLOCI_STORAGE_PERSISTENT_PATH=/opt/floci_data/data
39+
FLOCI_SERVICES_UI_ENABLED=false
40+
EOF
41+
msg_ok "Configured Floci"
42+
43+
msg_info "Creating Service"
44+
cat <<EOF >/etc/systemd/system/floci.service
45+
[Unit]
46+
Description=Floci
47+
After=network.target
48+
49+
[Service]
50+
Type=simple
51+
User=root
52+
WorkingDirectory=/opt/floci_data
53+
EnvironmentFile=/opt/floci_data/.env
54+
ExecStart=/usr/bin/java --enable-native-access=ALL-UNNAMED -jar /opt/floci/target/quarkus-app/quarkus-run.jar
55+
SuccessExitStatus=143
56+
Restart=on-failure
57+
RestartSec=5
58+
59+
[Install]
60+
WantedBy=multi-user.target
61+
EOF
62+
systemctl enable -q --now floci
63+
msg_ok "Created Service"
64+
65+
motd_ssh
66+
customize
67+
cleanup_lxc

‎json/floci.json‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "Floci",
3+
"slug": "floci",
4+
"categories": [
5+
20
6+
],
7+
"date_created": "2026-11-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"architectures": [
12+
"amd64",
13+
"arm64"
14+
],
15+
"interface_port": 4566,
16+
"documentation": "https://floci.io/floci/",
17+
"website": "https://floci.io/floci/",
18+
"repository": "https://github.com/floci-io/floci",
19+
"logo": "https://cdn.jsdelivr.net/gh/floci-io/floci@main/docs/assets/floci.svg",
20+
"description": "Floci is a free, open source local AWS emulator for development and CI. It serves S3, SQS, SNS, DynamoDB, IAM, Lambda, Secrets Manager and many more services on a single endpoint at port 4566, so the AWS CLI and SDKs work against it by setting an endpoint URL.",
21+
"install_methods": [
22+
{
23+
"type": "default",
24+
"script": "ct/floci.sh",
25+
"config_path": "/opt/floci_data/.env",
26+
"resources": {
27+
"cpu": 2,
28+
"ram": 3072,
29+
"hdd": 6,
30+
"os": "Debian",
31+
"version": "13"
32+
}
33+
}
34+
],
35+
"default_credentials": {
36+
"username": null,
37+
"password": null
38+
},
39+
"notes": [
40+
{
41+
"text": "Floci has no authentication. Use any non-empty AWS access key and secret (for example test/test), region us-east-1, and set the endpoint URL to http://<container-ip>:4566. Keep it on a trusted network.",
42+
"type": "warning"
43+
},
44+
{
45+
"text": "Docker is not installed, so services that run containers (Lambda, ECS, RDS, ElastiCache, EKS and similar) are limited or unavailable. S3, SQS, SNS, DynamoDB and the other core services work.",
46+
"type": "info"
47+
},
48+
{
49+
"text": "Response URLs such as SQS queue URLs use FLOCI_BASE_URL in /opt/floci_data/.env, set to the container IP at install. Update it and restart floci when the IP changes or clients reach Floci through a hostname.",
50+
"type": "info"
51+
}
52+
]
53+
}

0 commit comments

Comments
 (0)