Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
add gnuxlinusa.org
Browse files Browse the repository at this point in the history
  • Loading branch information
FarisZR committed Feb 3, 2024
1 parent 869b072 commit 7aebad4
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/gnulinuxsa-wordpress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: deploy-gnulinuxsa-wordpress

on:
push:
paths:
- '.github/workflows/gnulinuxsa-wordpress.yml'
- 'gnulinuxsa-wordpress/**'
branches: [main]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: gnulinuxsa.org
url: https://gnulinuxsa.org
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Tailscale
uses: tailscale/github-action@7a0b30ed3517c2244d1330e39467b95f067a33bd
with:
oauth-client-id: ${{ secrets.TAILSCALE_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_SECRET }}
tags: tag:deploy-ci
hostname: Github-actions
version: ${{ vars.TAILSCALE_VERSION }}

- name: Add secrets to compose
env:
MARIADB_PASSWORD: ${{ secrets.gnulinuxsa_wordpress_mariadb_password }}
run: |
sed -i "s|(gnulinuxsa_wordpress_mariadb_password)|$MARIADB_PASSWORD|g" $GITHUB_WORKSPACE/gnulinuxsa-wordpress/docker-compose.yml
- name: Start Deployment
uses: FarisZR/[email protected]
env:
MARIADB_PASSWORD: ${{ secrets.gnulinuxsa_wordpress_mariadb_password }}
with:
remote_docker_host: ${{ secrets.server_address }}
tailscale_ssh: true # no need for manual private and public keys
compose_file_path: gnulinuxsa-wordpress/docker-compose.yml
args: -p gnulinuxsa-wordpress up -d --remove-orphans
upload_directory: true
docker_compose_directory: gnulinuxsa-wordpress
5 changes: 5 additions & 0 deletions gnulinuxsa-wordpress/custom.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
file_uploads = On
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
46 changes: 46 additions & 0 deletions gnulinuxsa-wordpress/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3.1'

networks:
default:
enable_ipv6: true
web:
external: true

services:
wordpress:
image: wordpress:php7.4@sha256:7e46cf3373751b6d62b7a0fc3a7d6686f641a34a2a0eb18947da5375c55fd009
container_name: gnulinuxsa-wordpress
restart: always
environment:
WORDPRESS_DB_HOST: mariadb
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_PASSWORD: (gnulinuxsa_wordpress_mariadb_password)
networks:
default:
web:
volumes:
- html:/var/www/html:rw
configs:
- source: custom-ini
target: /usr/local/etc/php/conf.d/custom.ini

mariadb:
image: mariadb:11.2.2@sha256:a9385bb457ebf4600da632cc331f11a5328c582bfb492aa76517282bcae1dcc9
restart: always
environment:
MARIADB_USER: wordpress
MARIADB_DATABASE: wordpress
MARIADB_PASSWORD: (gnulinuxsa_wordpress_mariadb_password)
MARIADB_RANDOM_ROOT_PASSWORD: '1'
MARIADB_AUTO_UPGRADE: true
volumes:
- mariadb:/var/lib/mysql:rw

volumes:
mariadb:
html:

configs:
custom-ini:
file: /home/aosus/gnulinuxsa-wordpress/custom.ini

0 comments on commit 7aebad4

Please sign in to comment.