Skip to content

Commit 30d4f4d

Browse files
authored
chore: add orchestrator service and add router.deb
1 parent 7af2b10 commit 30d4f4d

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

debian/Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
FROM golang:1.24.2 AS go
22

3-
ARG BINARY_NAME="arduino-app-cli"
3+
ARG BINARY_NAME
4+
RUN test -n "${BINARY_NAME}" || (echo "Error: BINARY_NAME is not set" && exit 1)
45

56
COPY . /app
67
WORKDIR /app
7-
RUN GOOS=linux go build -o ${BINARY_NAME} ./cmd/arduino-app-cli/
8+
RUN GOOS=linux go build -o ${BINARY_NAME} ./cmd/${BINARY_NAME}
89

910
FROM debian:bookworm AS debian
1011

1112
ARG VERSION="1.0.0"
1213
ARG REVISION="1"
14+
ARG DEB_NAME
15+
RUN test -n "${DEB_NAME}" || (echo "Error: DEB_NAME is not set" && exit 1)
16+
ARG BINARY_NAME
17+
RUN test -n "${BINARY_NAME}" || (echo "Error: BINARY_NAME is not set" && exit 1)
1318

1419
RUN apt-get update && apt-get install -y sed
1520

16-
COPY ./debian/orchestrator /orchestrator/
17-
COPY --from=go /app/${BINARY_NAME} /orchestrator/usr/bin/${BINARY_NAME}
21+
COPY ./debian/${DEB_NAME} /${DEB_NAME}/
22+
COPY --from=go /app/${BINARY_NAME} /${DEB_NAME}/usr/bin/${BINARY_NAME}
1823

19-
RUN sed -i "s/ARCH/$(dpkg --print-architecture)/" /orchestrator/DEBIAN/control && \
20-
dpkg-deb --build --root-owner-group /orchestrator &&\
21-
mv /orchestrator.deb "/orchestrator_${VERSION}-${REVISION}_$(dpkg --print-architecture).deb"
24+
RUN sed -i "s/ARCH/$(dpkg --print-architecture)/" /${DEB_NAME}/DEBIAN/control && \
25+
dpkg-deb --build --root-owner-group /${DEB_NAME} &&\
26+
mv /${DEB_NAME}.deb "/${DEB_NAME}_${VERSION}-${REVISION}_$(dpkg --print-architecture).deb"
2227

2328
FROM scratch
2429

debian/orchestrator/DEBIAN/control

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ Version: 1.0
33
Architecture: ARCH
44
Maintainer: arduino <support@arduino.cc>
55
Description: Arduino application orchestrator
6-
Depends: docker.io, docker-compose
6+
Depends:
7+

debian/orchestrator/etc/systemd/system/arduino-orchestrator.service

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
Description=Arduino Orchestrator Service
33

44
[Service]
5-
ExecStart=/usr/bin/orchestrator
5+
ExecStart=/usr/bin/arduino-app-cli daemon --port 8800
6+
Environment="ARDUINO_APP_CLI__APPS_DIR=/opt/arduino/apps"
7+
Environment="ARDUINO_APP_CLI__DATA_DIR=/opt/arduino/data"
68
StandardOutput=journal
79
StandardError=journal
810
Restart=always

0 commit comments

Comments
 (0)