Skip to content

Commit

Permalink
Merge pull request #11 from lmbelo/main
Browse files Browse the repository at this point in the history
Update, bugfix and automation
  • Loading branch information
checkdigits authored Jul 10, 2024
2 parents 2de72b1 + 0d6a10d commit cb7a0a4
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 23 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-image-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker Image CI - Publish

on:
release:
types: [published]

# Manual run
workflow_dispatch:

jobs:

publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Docker Hub Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "$DOCKER_TOKEN" | docker login --username $DOCKER_USERNAME --password-stdin
- name: Build the Docker image
run: |
bash ./build.sh "localhost" 3050
- name: Docker Push
run: |
docker push -a radstudio/pa-radserver
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Docker Image CI - Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
bash ./build.sh "localhost" 3050
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ ENV PA_SERVER_PASSWORD=$password
#INSTALL APACHE AND OTHER LIBS
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yy --no-install-recommends install \
apache2 \
joe \
wget \
p7zip-full \
curl \
openssh-server \
build-essential \
libcurl4-openssl-dev \
libcurl4 \
libgl1-mesa-dev \
libgtk-3-bin \
libosmesa-dev \
zlib1g-dev \
libcurl4-gnutls-dev \
libncurses5 \
libpython3.10 \
unzip \
xorg
apache2 \
unzip
RUN apt-get -y autoremove && apt-get -y autoclean
#====END OTHER LIBS

Expand Down Expand Up @@ -109,8 +111,6 @@ RUN service apache2 restart
EXPOSE 80
# PAServer
EXPOSE 64211
# broadwayd
EXPOSE 8082

#need this to make the apache daemon run in foreground
#prevent container from ending when docker is started
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Docker script to build RAD Studio Linux deployment image including RAD Server en
- More information on [RAD Studio](https://www.embarcadero.com/products/rad-studio)
- Other containers: [InterBase](https://github.com/Embarcadero/InterBase-Docker), [PAServer](https://github.com/Embarcadero/paserver-docker) and [RAD Server with InterBase](https://github.com/Embarcadero/pa-radserver-ib-docker).

The image defaults to running **PAServer** on port `64211` with the _password_ `securepass`, and **Broadwayd** on port `8082`
The image defaults to running **PAServer** on port `64211` with the _password_ `securepass`

The 10.x images use Ubuntu 18.04.6 LTS (Bionic Beaver) while the 11.x images use Ubuntu 22.04.1 LTS (Jammy Jellyfish)

Expand Down
4 changes: 2 additions & 2 deletions Solutions/Custom-RAD-Server-Module/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ if [ "$1" = '' ] || [ "$2" = '' ]; then
echo "ex: run.sh example.com 3050";
else
echo "PAServer Password: securepass"
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it --mount source=ems,target=/etc/ems -e DB_PORT=$2 -e DB_HOST=$1 -e PA_SERVER_PASSWORD=securepass -p 80:80 -p 64211:64211 -p 8082:8082 pa-radserver-custom-module
fi
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it --mount source=ems,target=/etc/ems -e DB_PORT=$2 -e DB_HOST=$1 -e PA_SERVER_PASSWORD=securepass -p 80:80 -p 64211:64211 pa-radserver-custom-module
fi
8 changes: 0 additions & 8 deletions radserver_docker.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#!/bin/bash

if [ "$CONFIG" = "PRODUCTION" ]; then
:
else
nohup broadwayd :2 &
export GDK_BACKEND=broadway
export BROADWAY_DISPLAY=:2
fi

#search and replace ems ini file InstanceName
if [ "$DB_HOST" = "" ]; then
:
Expand Down
2 changes: 1 addition & 1 deletion run-production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ if [ "$1" = '' ] || [ "$2" = '' ]; then
echo "Required arguments: RAD Server database (InterBase) host and port";
echo "ex: run-production.sh example.com 3050";
else
docker run -d --platform linux/amd64 --mount source=ems,target=/etc/ems -e DB_PORT=$2 -e DB_HOST=$1 -e CONFIG=PRODUCTION -p 80:80 radstudio/pa-radserver:latest
docker run -d -t --platform linux/amd64 --mount source=ems,target=/etc/ems -e DB_PORT=$2 -e DB_HOST=$1 -e CONFIG=PRODUCTION -p 80:80 radstudio/pa-radserver:latest
fi
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ else
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --platform linux/amd64 \
-it --mount source=ems,target=/etc/ems \
-e DB_PORT=$2 -e DB_HOST=$1 \
-e PA_SERVER_PASSWORD=securepass -p 80:80 -p 64211:64211 -p 8082:8082 \
-e PA_SERVER_PASSWORD=securepass -p 80:80 -p 64211:64211 \
radstudio/pa-radserver:latest
fi

0 comments on commit cb7a0a4

Please sign in to comment.