feat: PROD_URL

This commit is contained in:
ange 2024-05-01 12:19:54 +02:00
parent 4c06b487b3
commit f8cde647b1
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
3 changed files with 10 additions and 4 deletions

1
.env
View File

@ -1 +1,2 @@
PROD_URL=searx.gmoker.com
IMAGEAPP=docker.io/searxng/searxng:2024.4.30-f8bdf6197

View File

@ -1,15 +1,20 @@
on: push
jobs:
build:
name: test
deploy:
runs-on: debian
steps:
- uses: actions/checkout@v1
- name: setup env
run: |
. ./.env
if [ "${{ gitea.ref_name }}" == prod ] && [ -n "$PROD_URL" ]; then
BASE_URL="$PROD_URL"
else
BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k8s.gmoker.com"
fi
cat <<EOF >> .env
BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k8s.gmoker.com"
BASE_URL="$BASE_URL"
EOF
cat .env

View File

@ -12,7 +12,7 @@ services:
ports:
- "8080:8080"
environment:
- SEARXNG_SECRET=secret
- SEARXNG_SECRET=secret # $(openssl rand -hex 32)
volumes:
- ./limiter.toml:/etc/searxng/limiter.toml:ro
- ./settings.yml:/etc/searxng/settings.yml:ro