Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Docker] Updated Dockerfile's #1

Merged
merged 23 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6471561
add docker deployer
OfficialR3ido101 Feb 9, 2024
8a41d5d
added zip because it was missing
OfficialR3ido101 Feb 9, 2024
8467e43
change runner size
OfficialR3ido101 Feb 9, 2024
409856f
change runner size
OfficialR3ido101 Feb 9, 2024
8578482
use own runner
OfficialR3ido101 Feb 9, 2024
ea6b5f2
update to work on self-hosted
OfficialR3ido101 Feb 9, 2024
77cca16
make sure it uses all cores
OfficialR3ido101 Feb 9, 2024
5d2d07b
fix docker build error.
OfficialR3ido101 Feb 10, 2024
1a1138f
disabled test and fixed naming scheme in deploy file
OfficialR3ido101 Feb 10, 2024
6b27e6a
add a wait time for the assignment clients
OfficialR3ido101 Feb 10, 2024
8229b1c
preserv build directory and removed 30sec delay from assignment clients
OfficialR3ido101 Feb 11, 2024
a5bbd43
testing node setup...
OfficialR3ido101 Feb 11, 2024
326ecb0
forgot to copy stuff
OfficialR3ido101 Feb 11, 2024
071e56b
removed not needed stuff from build
OfficialR3ido101 Feb 11, 2024
9653ac5
updated maintainer
OfficialR3ido101 Feb 11, 2024
68fed48
trying to fix node #1
OfficialR3ido101 Feb 11, 2024
40f84cf
update README.md
OfficialR3ido101 Feb 11, 2024
e36449f
fixed docker-compose.yml
OfficialR3ido101 Feb 11, 2024
d1d0bdd
make it match overte-org repo
OfficialR3ido101 Feb 11, 2024
801aa46
changed from self-hosted to docker
OfficialR3ido101 Feb 11, 2024
5135c1e
Integrated prebuild.py (#1)
OfficialR3ido101 Feb 26, 2024
24f9f94
Fixing the runner image (#2)
OfficialR3ido101 Feb 26, 2024
5143563
removed delay's (#3)
OfficialR3ido101 Feb 27, 2024
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
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Push Domain Server Images

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: docker

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/#-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}


- name: Build server runtime with compiled binaries
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.runtime
push: true
tags: ghcr.io/${{ github.repository }}/domain-server:latest
15 changes: 9 additions & 6 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Docker environment for building Overte server
FROM ubuntu:22.04

ARG REPO=https://github.com/overte-org/overte
ARG TAG=master

ARG DEBIAN_FRONTEND=noninteractive
ARG TERM=linux

RUN mkdir /opt/overte-build \
&& mkdir /opt/overte

# Install dependencies
RUN apt update && apt install -y tzdata curl ninja-build git cmake g++ npm libssl-dev python3-distutils python3-distro mesa-common-dev libgl1-mesa-dev \
RUN apt update && apt install -y python3-full zip tzdata curl ninja-build git cmake g++ npm libssl-dev python3-distutils python3-distro mesa-common-dev libgl1-mesa-dev \
libqt5websockets5-dev qtscript5-dev qtdeclarative5-dev qtmultimedia5-dev libqt5webchannel5-dev qtwebengine5-dev libqt5xmlpatterns5-dev

# Fetch repository
RUN git clone --depth 1 --branch $TAG $REPO /opt/overte-build/
RUN git clone https://github.com/overte-org/overte.git /opt/overte-build/

# Build just the server
RUN cd /opt/overte-build \
Expand All @@ -25,8 +22,14 @@ RUN cd /opt/overte-build \
&& export RELEASE_TYPE=PRODUCTION \
&& cmake -DSERVER_ONLY=1 -DOVERTE_CPU_ARCHITECTURE=-msse3 ..

# put number after -j to limit cores.
RUN cd /opt/overte-build/build \
&& make
&& make -j

RUN VCPKG_PATH=$(python3 /opt/overte-build/prebuild.py --get-vcpkg-path --build-root . --quiet) && \
echo "VCPKG Path: $VCPKG_PATH" && \
find "$VCPKG_PATH" -type f -name "libnode.so.108" -exec cp {} /opt/overte-build/build/libraries \; || \
echo "libnode.so.108 not found in $VCPKG_PATH"

RUN mv /opt/overte-build/build/libraries /opt/overte/libraries \
&& mv /opt/overte-build/build/assignment-client/assignment-client /opt/overte/assignment-client \
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.runtime
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Overte Server runtime image. domain-server-builder must be built first.
FROM domain-server-builder as build
FROM ghcr.io/overte-org/overte-domain-server-docker/domain-server-builder:latest as build

LABEL maintainer="Micah (https://github.com/akamicah)"
LABEL maintainer="OfficialR3ido101 (https://github.com/OfficialR3ido101)"
LABEL description="Overte domain server runtime"

FROM ubuntu:22.04
Expand All @@ -23,6 +23,7 @@ RUN apt clean && rm -rf /var/lib/app/lists/*

# Install libraries
COPY --from=build /opt/overte/libraries/*/*.so /lib/
COPY --from=build /opt/overte/libraries/libnode.so.108 /lib/

# Fetch built services
RUN mkdir /opt/overte
Expand All @@ -35,8 +36,8 @@ RUN chmod +x /opt/overte/domain-server && \
chmod +x /opt/overte/assignment-client

# Server run test
RUN /opt/overte/domain-server --version > /opt/overte/version && \
/opt/overte/assignment-client --version >> /opt/overte/version
# RUN /opt/overte/domain-server --version > /opt/overte/version && \
# /opt/overte/assignment-client --version >> /opt/overte/version

# Install supervisor config
COPY ./files/overte.conf /etc/supervisor/conf.d/overte.conf
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Build Status

[![Docker Build](https://github.com/terminalx-resonite/overte-domain-server-docker/actions/workflows/deploy.yaml/badge.svg)](https://github.com/terminalx-resonite/overte-domain-server-docker/actions/workflows/deploy.yaml)

# Overte Domain Server Docker Images

Contained in this repo are two docker images which are used to build and run the Overte domain server as a docker image.
Expand All @@ -24,5 +28,5 @@ docker run -d --name overte-server -p 40100-40102:40100-40102 -p 40100-40102:401

# Prebuilt Image

If you would prefer, a prebuilt image for amd64 environments can be used by replacing `domain-server` with `akamicah/overte-domain-server:latest` in either the `docker run` command or the `docker-compose.yml` file.
If you would prefer, a prebuilt image for amd64 environments can be used by replacing `domain-server` with `ghcr.io/overte-org/overte-domain-server-docker/domain-server:latest` in either the `docker run` command or the `docker-compose.yml` file.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
overte-server:
#image: domain-server
image: akamicah/overte-domain-server:latest
image: ghcr.io/overte-org/overte-domain-server-docker/domain-server:latest
container_name: overte-server
restart: unless-stopped
expose:
Expand Down
1 change: 1 addition & 0 deletions files/overte.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ autorestart=unexpected
directory=/opt/overte
stderr_logfile=/var/log/overte-err.log
stdout_logfile=/var/log/overte-out.log