Skip to content

Commit

Permalink
Merge pull request #21 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 b841cc3 + c4ad98c commit a3059b3
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 15 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
- name: Docker Push
run: |
docker push -a radstudio/paserver
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
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ RUN apt-get update && \
zlib1g-dev \
libcurl4-gnutls-dev \
libncurses5 \
libgl1-mesa-dev \
libgtk-3-bin \
libosmesa-dev \
libpython3.10 \
xorg
libpython3.10

### Install PAServer
ADD https://altd.embarcadero.com/releases/studio/23.0/121/1211/LinuxPAServer23.0.tar.gz ./paserver.tar.gz
Expand All @@ -39,7 +35,5 @@ RUN chmod +x paserver_docker.sh

# PAServer
EXPOSE 64211
# broadwayd
EXPOSE 8082

CMD ./paserver_docker.sh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Docker script for RAD Studio Linux deployment via PAServer
- [More information on RAD Studio](https://www.embarcadero.com/products/rad-studio)
- Other containers: [InterBase](https://github.com/Embarcadero/InterBase-Docker) only, [RAD Server](https://github.com/Embarcadero/pa-radserver-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 All @@ -28,7 +28,7 @@ To pull and run the Docker Hub version of PAServer Docker for a non-debug/produc
./pull-run-production.sh securepass123
```

To run the Docker Hub version of PAServer Docker for a debug/non-production environment use the `pull-run.sh` script
To run the Docker Hub version of PAServer Docker for a debug/non-production environment use the `run.sh` script
```
./run.sh
```
Expand Down
4 changes: 0 additions & 4 deletions paserver_docker.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash

nohup broadwayd :2 &
export GDK_BACKEND=broadway
export BROADWAY_DISPLAY=:2

./paserver -password=$PA_SERVER_PASSWORD
status=$?
if [ $status -ne 0 ]; 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" = '' ]; then
echo "Required arguments: PAServer password";
echo "ex: run-production.sh securepass";
else
docker run --platform linux/amd64 -d -t -e PA_SERVER_PASSWORD=$1 -p 64211:64211 -p 8082:8082 radstudio/paserver:latest
docker run --platform linux/amd64 -d -t -e PA_SERVER_PASSWORD=$1 -p 64211:64211 radstudio/paserver:latest
fi
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

echo "PAServer Password: securepass"
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --platform linux/amd64 -it -e PA_SERVER_PASSWORD=securepass -p 64211:64211 -p 8082:8082 radstudio/paserver:latest
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --platform linux/amd64 -it -e PA_SERVER_PASSWORD=securepass -p 64211:64211 radstudio/paserver:latest

0 comments on commit a3059b3

Please sign in to comment.