Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
Adam Štrauch | 07c9d923bb | |
Adam Štrauch | 047f922fae | |
Adam Štrauch | ebfc74b9e3 | |
Adam Štrauch | 9bd5aefd76 | |
Adam Štrauch | c397e365dc | |
Adam Štrauch | 73b5ce09e3 | |
Adam Štrauch | 940d2b7f01 | |
Adam Štrauch | bef7e0a2c7 | |
Adam Štrauch | 488cea48af | |
Adam Štrauch | 27c6165dd0 | |
Adam Štrauch | 3583913038 | |
Adam Štrauch | 83d43a4121 | |
Adam Štrauch | fe72c1a797 | |
Adam Štrauch | c5801364d1 | |
Adam Štrauch | 82c648b7cd | |
Adam Štrauch | 2c9ee0c3a7 |
|
@ -4,7 +4,7 @@ name: image building
|
|||
|
||||
steps:
|
||||
- name: build&push squashed image
|
||||
image: harbor.hq.rosti.cz/library/builder:35
|
||||
image: harbor.hq.rosti.cz/library/builder:39
|
||||
environment:
|
||||
username: robot$rosti+rosti
|
||||
password:
|
||||
|
@ -13,7 +13,7 @@ steps:
|
|||
privileged: true
|
||||
commands:
|
||||
- echo "$password" | podman login -u $username --password-stdin $repo
|
||||
- make DOCKER=podman push
|
||||
- task push
|
||||
|
||||
trigger:
|
||||
event:
|
||||
|
@ -29,7 +29,7 @@ name: test image
|
|||
|
||||
steps:
|
||||
- name: test build
|
||||
image: harbor.hq.rosti.cz/library/builder:35
|
||||
image: harbor.hq.rosti.cz/library/builder:39
|
||||
environment:
|
||||
username: robot$rosti+rosti
|
||||
password:
|
||||
|
@ -38,8 +38,8 @@ steps:
|
|||
privileged: true
|
||||
commands:
|
||||
- echo "$password" | podman login -u $username --password-stdin $repo
|
||||
- make VERSION=test DOCKER=podman build
|
||||
- make DOCKER=podman VERSION=test test
|
||||
- task build VERSION=test
|
||||
- task test VERSION=test
|
||||
|
||||
trigger:
|
||||
event:
|
|
@ -0,0 +1,29 @@
|
|||
name: Test build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [moon, amd64]
|
||||
container:
|
||||
image: harbor.hq.rosti.cz/library/builder:38
|
||||
env:
|
||||
REPO: harbor.hq.rosti.cz
|
||||
USERNAME: robot$rosti+rosti
|
||||
# ports:
|
||||
# - 80
|
||||
# volumes:
|
||||
# - my_docker_volume:/volume_mount
|
||||
# options: --cpus 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Test build
|
||||
run: |
|
||||
echo "${{ secrets.repo_password }}" | podman login -u $USERNAME --password-stdin $REPO
|
||||
# task build
|
||||
# task test
|
||||
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
name: Image testing
|
||||
|
||||
on:
|
||||
- push
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: testing
|
||||
run: |
|
||||
make build
|
||||
make test
|
45
Dockerfile
45
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM debian:11
|
||||
FROM debian:bookworm
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
||||
|
@ -44,42 +44,43 @@ ENV TERM xterm
|
|||
## Node.js
|
||||
WORKDIR /usr/src
|
||||
ADD build_node.sh /usr/local/bin/build_node.sh
|
||||
# 2023/04
|
||||
RUN build_node.sh 16.19.0
|
||||
RUN build_node.sh 17.9.1
|
||||
RUN build_node.sh 18.12.1
|
||||
RUN build_node.sh 18.15.0
|
||||
RUN build_node.sh 19.6.0
|
||||
# 2023/08
|
||||
RUN build_node.sh 19.9.0
|
||||
RUN build_node.sh 18.17.1
|
||||
RUN build_node.sh 20.5.1
|
||||
RUN build_node.sh 20.9.0
|
||||
RUN build_node.sh 21.2.0
|
||||
|
||||
## Python
|
||||
WORKDIR /usr/src
|
||||
ADD build_python.sh /usr/local/bin/build_python.sh
|
||||
# 2023/04
|
||||
RUN build_python.sh 3.9.16
|
||||
RUN build_python.sh 3.10.11
|
||||
RUN build_python.sh 3.11.3
|
||||
# 2023/08
|
||||
RUN build_python.sh 3.10.12
|
||||
RUN build_python.sh 3.10.13
|
||||
RUN build_python.sh 3.11.4
|
||||
RUN build_python.sh 3.11.6
|
||||
RUN build_python.sh 3.12.0
|
||||
|
||||
## PHP 8
|
||||
ADD build_php8.sh /usr/local/bin/build_php8.sh
|
||||
# 2023/04
|
||||
RUN build_php8.sh 8.1.13
|
||||
RUN build_php8.sh 8.1.16
|
||||
RUN build_php8.sh 8.2.1
|
||||
RUN build_php8.sh 8.2.3
|
||||
# 2023/08
|
||||
RUN build_php8.sh 8.1.21
|
||||
RUN build_php8.sh 8.1.25
|
||||
RUN build_php8.sh 8.2.7
|
||||
RUN build_php8.sh 8.2.12
|
||||
|
||||
## Ruby
|
||||
WORKDIR /usr/src
|
||||
ADD build_ruby.sh /usr/local/bin/build_ruby.sh
|
||||
# 2022/12
|
||||
RUN build_ruby.sh 3.1.3
|
||||
RUN build_ruby.sh 3.2.0
|
||||
# 2023/08
|
||||
RUN build_ruby.sh 3.1.4
|
||||
RUN build_ruby.sh 3.2.2
|
||||
|
||||
## Deno
|
||||
ADD build_deno.sh /usr/local/bin/build_deno.sh
|
||||
# 2023/04
|
||||
RUN build_deno.sh 1.30.1
|
||||
RUN build_deno.sh 1.32.3
|
||||
# 2023/08
|
||||
RUN build_deno.sh 1.36.1
|
||||
RUN build_deno.sh 1.38.2
|
||||
|
||||
#############
|
||||
|
||||
|
|
5
Makefile
5
Makefile
|
@ -1,7 +1,8 @@
|
|||
# TODO: Unnecessary, remo this file
|
||||
REPO=harbor.hq.rosti.cz/rosti/runtime
|
||||
DOCKER=docker
|
||||
VERSION=2023.04-1
|
||||
BASEIMAGE=debian:11
|
||||
VERSION=2023.12-1
|
||||
BASEIMAGE=debian:12
|
||||
|
||||
all: build
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
REPO: harbor.hq.rosti.cz/rosti/runtime
|
||||
VERSION: 2023.12-1
|
||||
BASEIMAGE: debian:bookworm
|
||||
|
||||
tasks:
|
||||
default:
|
||||
deps:
|
||||
- build
|
||||
|
||||
build:
|
||||
cmds:
|
||||
- docker pull {{ .BASEIMAGE }}
|
||||
- docker build -t {{ .REPO }}:dev .
|
||||
- docker tag {{ .REPO }}:dev {{ .REPO }}:{{ .VERSION }}
|
||||
- echo "JSON for admin:"
|
||||
- python3 generate_versions.py
|
||||
|
||||
test:
|
||||
cmds:
|
||||
- bash ./tests2.sh {{ .REPO }}:{{ .VERSION }}
|
||||
|
||||
squashed:
|
||||
cmds:
|
||||
- docker pull {{ .BASEIMAGE }}
|
||||
- docker build --squash -t {{ .REPO }}:dev-squashed .
|
||||
- docker tag {{ .REPO }}:dev-squashed {{ .REPO }}:{{ .VERSION }}
|
||||
- echo "JSON for admin:"
|
||||
- python3 generate_versions.py
|
||||
|
||||
push:
|
||||
cmds:
|
||||
- docker push {{ .REPO }}:{{ .VERSION }}
|
||||
deps:
|
||||
- squashed
|
|
@ -18,3 +18,6 @@ cd ruby-$VERSION
|
|||
./configure --prefix=/opt/techs/ruby-$VERSION
|
||||
make -j
|
||||
make install
|
||||
|
||||
/opt/techs/ruby-${VERSION}/bin/gem update --system
|
||||
/opt/techs/ruby-${VERSION}/bin/gem install passenger
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
[program:app]
|
||||
command=/srv/bin/primary_tech/ruby app.rb
|
||||
command=passenger start --port 8000 --log-file /dev/stdout --pid-file /srv/run/passenger.pid
|
||||
environment=PATH="/srv/bin/primary_tech:/usr/local/bin:/usr/bin:/bin:/srv/.npm-packages/bin"
|
||||
stopasgroup=true
|
||||
directory=/srv/app
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
. ~/.bashrc
|
||||
|
||||
# DEFAULT VERSIONS
|
||||
VERSION_PYTHON=3.11.3
|
||||
VERSION_PHP=8.2.3
|
||||
VERSION_NODE=19.9.0
|
||||
VERSION_RUBY=3.2.0
|
||||
VERSION_DENO=1.32.3
|
||||
VERSION_PYTHON="3.12.0"
|
||||
VERSION_PHP="8.2.12"
|
||||
VERSION_NODE="20.9.0"
|
||||
VERSION_RUBY="3.2.2"
|
||||
VERSION_DENO="1.38.2"
|
||||
|
||||
WIDTH=180
|
||||
HEIGHT=25
|
||||
|
@ -110,6 +110,14 @@ function setTech() {
|
|||
echo ".. app configuration for nginx not found, adding it - please check /srv/conf/nginx.d/app.conf and make sure it fits your code"
|
||||
fi
|
||||
|
||||
if [ "$name" = "ruby" ]; then
|
||||
mkdir -p /srv/app/public
|
||||
rm /srv/conf/nginx.d/app.conf
|
||||
mv /srv/app/index.html /srv/app/public/index.html
|
||||
rm -rf /srv/conf/nginx.d
|
||||
rm -f /srv/conf/supervisor.d/nginx.conf
|
||||
fi
|
||||
|
||||
# We load new configuration into supervisor and it's automatically started or restarted if needed
|
||||
supervisorctl reread
|
||||
supervisorctl update
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
mkdir -p /srv/var/redis
|
||||
mkdir -p /srv/run
|
||||
cp /opt/conf/redis.conf /srv/conf/
|
||||
cp /opt/examples/redis/redis.conf /srv/conf/
|
||||
|
||||
cat << EOF > /srv/conf/supervisor.d/redis.conf
|
||||
[program:redis]
|
||||
|
|
6
start.sh
6
start.sh
|
@ -125,6 +125,12 @@ if [ -e /srv/app/init.sh ]; then
|
|||
su app -c /srv/app/init.sh
|
||||
fi
|
||||
|
||||
if [ -e /srv/init.sh ]; then
|
||||
echo "Starting /srv/init.sh .."
|
||||
chmod 755 /srv/init.sh
|
||||
su app -c /srv/init.sh
|
||||
fi
|
||||
|
||||
# Custom /etc/ssl/openssl.cnf
|
||||
if [ -e /srv/conf/openssl.cnf ]; then
|
||||
rm /etc/ssl/openssl.cnf
|
||||
|
|
Loading…
Reference in New Issue