Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,35 @@ jobs:
gh release upload ${{ needs.create-release.outputs.tag_name }} combined_checksums.txt --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-and-push:
name: Build AtomOS-GUI docker image
runs-on: ubuntu-latest
steps:

# build and push the docker image to ghcr.io

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
submodules: recursive
ref: ${{ github.ref }}

- name: Populate daemons folder
run: |
export CI_TOKEN=${{ secrets.CI_TOKEN }}
./populate_daemons.sh --platform linux --arch x64 --develop

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.REPO_KEY }}

- name: Build and push Docker image
run: |
OWNER_NAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -f docker/Dockerfile -t ghcr.io/${OWNER_NAME}/elemento-electros-instance:beta .
docker push ghcr.io/${OWNER_NAME}/elemento-electros-instance:beta
6 changes: 2 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build and Push Electros docker image

on:
push:
branches: [ develop ]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -38,5 +36,5 @@ jobs:
- name: Build and push Docker image
run: |
OWNER_NAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -f docker/Dockerfile -t ghcr.io/${OWNER_NAME}/elemento-electros-instance:latest .
docker push ghcr.io/${OWNER_NAME}/elemento-electros-instance:latest
docker build -f docker/Dockerfile -t ghcr.io/${OWNER_NAME}/elemento-electros-instance:dev .
docker push ghcr.io/${OWNER_NAME}/elemento-electros-instance:dev
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,35 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}

build-and-push:
name: Build AtomOS-GUI docker image
runs-on: ubuntu-latest
steps:

# build and push the docker image to ghcr.io

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
submodules: recursive
ref: ${{ github.ref }}

- name: Populate daemons folder
run: |
export CI_TOKEN=${{ secrets.CI_TOKEN }}
./populate_daemons.sh --platform linux --arch x64 --develop

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.REPO_KEY }}

- name: Build and push Docker image
run: |
OWNER_NAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -f docker/Dockerfile -t ghcr.io/${OWNER_NAME}/elemento-electros-instance:latest .
docker push ghcr.io/${OWNER_NAME}/elemento-electros-instance:latest
32 changes: 32 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,35 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}

build-and-push:
name: Build AtomOS-GUI docker image
runs-on: ubuntu-latest
steps:

# build and push the docker image to ghcr.io

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
submodules: recursive
ref: ${{ github.ref }}

- name: Populate daemons folder
run: |
export CI_TOKEN=${{ secrets.CI_TOKEN }}
./populate_daemons.sh --platform linux --arch x64 --develop

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.REPO_KEY }}

- name: Build and push Docker image
run: |
OWNER_NAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -f docker/Dockerfile -t ghcr.io/${OWNER_NAME}/elemento-electros-instance:nightly .
docker push ghcr.io/${OWNER_NAME}/elemento-electros-instance:nightly
17 changes: 10 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# #******************************************************************************#
# # Copyright(c) 2019-2023, Elemento srl, All rights reserved #
# # Copyright(c) 2019-2026, Elemento srl, All rights reserved #
# # Author: Elemento srl #
# # Contributors are mentioned in the code where appropriate. #
# # Permission to use and modify this software and its documentation strictly #
Expand Down Expand Up @@ -28,26 +28,29 @@

FROM nginx:trixie

# gather daemons
# copy app code
# daemons must run in background - ./daemons
# entrypoint must run the electros app on port 80
# Stage 1: Copy data
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY electros-daemons/linux/x64/* /opt/daemons/
COPY elemento-gui-new/ /usr/share/nginx/html/
COPY elemento-gui-new/electros/configs/atomosFlags.json /usr/share/nginx/html/electros/configs/flags.json
COPY elemento-gui-new/electros/electrosOnAtomos.html /usr/share/nginx/html/electros/electros.html
COPY docker/startup.sh /opt/app/startup.sh
COPY docker/session_guard.py /opt/app/session_guard.py
COPY ./docker/follow_log.sh /opt/app/follow_log.sh
COPY ./docker/logger_stream.sh /opt/app/logger_stream.sh

RUN apt-get update
RUN apt-get install -y socat
# Stage 2: Install dependencies
RUN apt-get update -y
RUN apt-get install -y socat=1.8.0.3-1 \
python3=3.13.5-1

RUN rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

# Stage 3: permissions for scripts
RUN chmod +x /opt/daemons/*
RUN chmod +x /opt/app/startup.sh

# Stage 4: prepared forlders
RUN mkdir -p /var/log/elemento

RUN ls -lah /usr/share/nginx/html/
Expand Down
8 changes: 5 additions & 3 deletions docker/arm_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ COPY elemento-gui-new/ /usr/share/nginx/html/
COPY elemento-gui-new/electros/configs/atomosFlags.json /usr/share/nginx/html/electros/configs/flags.json
COPY elemento-gui-new/electros/electrosOnAtomos.html /usr/share/nginx/html/electros/electros.html
COPY ./docker/arm_startup.sh /opt/app/startup.sh
COPY ./docker/session_guard.py /opt/app/session_guard.py
COPY ./docker/follow_log.sh /opt/app/follow_log.sh
COPY ./docker/logger_stream.sh /opt/app/logger_stream.sh

RUN apt update
RUN apt install -y socat
RUN apt-get update -y
RUN apt install -y socat=1.8.0.3-1 \
python3=3.13.5-1

RUN rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

RUN chmod +x /opt/daemons/*
Expand All @@ -53,7 +56,6 @@ RUN mkdir -p /var/log/elemento

RUN ls -lah /usr/share/nginx/html/

EXPOSE 80
EXPOSE 443

ENTRYPOINT [ "/opt/app/startup.sh" ]
Expand Down
3 changes: 2 additions & 1 deletion docker/arm_startup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash
# #******************************************************************************#
# # Copyright(c) 2019-2023, Elemento srl, All rights reserved #
# # Copyright(c) 2019-2026, Elemento srl, All rights reserved #
# # Author: Elemento srl #
# # Contributors are mentioned in the code where appropriate. #
# # Permission to use and modify this software and its documentation strictly #
Expand Down Expand Up @@ -32,6 +32,7 @@
#/opt/daemons/Elemento_Daemons_linux_x86 > /var/log/elemento/elemento_daemons.log 2>&1 &
/opt/daemons/elemento_daemons_linux_arm >/var/log/elemento/elemento_daemons.log 2>&1 &
/opt/app/logger_stream.sh >/dev/null &
python3 /opt/app/session_guard.py >/dev/null &

# run the project

Expand Down
28 changes: 26 additions & 2 deletions docker/follow_log.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
#!/bin/bash
# #******************************************************************************#
# # Copyright(c) 2019-2026, Elemento srl, All rights reserved #
# # Author: Elemento srl #
# # Contributors are mentioned in the code where appropriate. #
# # Permission to use and modify this software and its documentation strictly #
# # for personal purposes is hereby granted without fee, #
# # provided that the above copyright notice appears in all copies #
# # and that both the copyright notice and this permission notice appear in the #
# # supporting documentation. #
# # Modifications to this work are allowed for personal use. #
# # Such modifications have to be licensed under a #
# # Creative Commons BY-NC-ND 4.0 International License available at #
# # http://creativecommons.org/licenses/by-nc-nd/4.0/ and have to be made #
# # available to the Elemento user community #
# # through the original distribution channels. #
# # The authors make no claims about the suitability #
# # of this software for any purpose. #
# # It is provided "as is" without express or implied warranty. #
# #******************************************************************************#
#
# #------------------------------------------------------------------------------#
# #Electros #
# #Authors: #
# #- Simone Robaldo (srobaldo at elemento.cloud) #
# #------------------------------------------------------------------------------#
#

LOG_FILE=/var/log/elemento/elemento_daemons.log

Expand Down Expand Up @@ -31,5 +57,3 @@ tail -n 0 -F "$LOG_FILE" | while IFS= read line; do
len=$(printf "%s" "$chunk" | wc -c)
printf "%x\r\n%s\r\n" "$len" "$chunk" || break
done


26 changes: 26 additions & 0 deletions docker/logger_stream.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
#!/bin/sh
# #******************************************************************************#
# # Copyright(c) 2019-2026, Elemento srl, All rights reserved #
# # Author: Elemento srl #
# # Contributors are mentioned in the code where appropriate. #
# # Permission to use and modify this software and its documentation strictly #
# # for personal purposes is hereby granted without fee, #
# # provided that the above copyright notice appears in all copies #
# # and that both the copyright notice and this permission notice appear in the #
# # supporting documentation. #
# # Modifications to this work are allowed for personal use. #
# # Such modifications have to be licensed under a #
# # Creative Commons BY-NC-ND 4.0 International License available at #
# # http://creativecommons.org/licenses/by-nc-nd/4.0/ and have to be made #
# # available to the Elemento user community #
# # through the original distribution channels. #
# # The authors make no claims about the suitability #
# # of this software for any purpose. #
# # It is provided "as is" without express or implied warranty. #
# #******************************************************************************#
#
# #------------------------------------------------------------------------------#
# #Electros #
# #Authors: #
# #- Simone Robaldo (srobaldo at elemento.cloud) #
# #------------------------------------------------------------------------------#
#

PORT=5142

Expand Down
Loading
Loading