Skip to content

Commit 0ff2826

Browse files
committed
Init
0 parents  commit 0ff2826

File tree

21 files changed

+1782
-0
lines changed

21 files changed

+1782
-0
lines changed

.env

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# NPP environment file
2+
3+
# Wordpress Settings
4+
export WORDPRESS_HOME=wordpress
5+
export WORDPRESS_DB_HOST=db:3306
6+
export WORDPRESS_DB_NAME=wordpress
7+
export WORDPRESS_DB_USER=wordpress
8+
export WORDPRESS_DB_PASSWORD=password123!
9+
10+
# MySQL Settings
11+
export MYSQL_HOME=wordpress-db
12+
export MYSQL_DATABASE=${WORDPRESS_DB_NAME}
13+
export MYSQL_USER=${WORDPRESS_DB_USER}
14+
export MYSQL_PASSWORD=${WORDPRESS_DB_PASSWORD}
15+
export MYSQL_ROOT_PASSWORD=rootpassword123!
16+
17+
# Nginx Settings
18+
export NGINX_CACHE=nginx_cache
19+
export NGINX_CONF=./nginx/nginx.conf
20+
export NPP_NGINX_CONF=./nginx/npp.conf
21+
export NPP_NGINX_PARAMS_CONF=./nginx/fastcgi_params
22+
export NGINX_LOGS=./logs/nginx
23+
24+
# WP-CLI Settings
25+
export WORDPRESS_SITE_URL_=https://localhost
26+
export WORDPRESS_SITE_TITLE_="NPP Dockerized"
27+
export WORDPRESS_ADMIN_USER_=npp
28+
export WORDPRESS_ADMIN_PASSWORD_=npp
29+
export WORDPRESS_ADMIN_EMAIL_=[email protected]
30+
31+
# FPM Settings
32+
export NPP_FPM_CONF=./fpm/www.conf
33+
export FPM_DOCKER_CONF=./fpm/zz-docker.conf
34+
35+
# PHP Settings
36+
export NPP_PHP_CONF=./php/npp.ini
37+
38+
# SSL Settings
39+
export NGINX_SSL_CERTS=./ssl
40+
41+
# NPP Specific Settings
42+
export NGINX_WEB_USER_=nginx
43+
export NPP_NGINX_CACHE_PATH_=/var/cache/nginx
44+
export MOUNT_DIR_=${NPP_NGINX_CACHE_PATH_}-npp
45+
export NPP_WEB_ROOT_=/var/www/html
46+
export NPP_USER_=npp
47+
export NPP_UID_=18978
48+
export NPP_GID_=33749
49+
50+
# Plugins to Install (comma seperated)
51+
export NPP_PLUGINS_="fastcgi-cache-purge-and-preload-nginx"
52+
53+
# Default Theme
54+
export NPP_THEMES_=""
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: NPP Build and Push Docker Image
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build:
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
attestations: write
20+
id-token: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.event.pull_request.base.ref }}
27+
28+
29+
- name: Source env.template
30+
run: |
31+
set -a
32+
source .env
33+
set +a
34+
35+
- name: Install Docker Compose
36+
run: |
37+
curl -L https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
38+
chmod +x /usr/local/bin/docker-compose
39+
40+
- name: Log into registry
41+
if: github.event_name != 'pull_request'
42+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
43+
with:
44+
registry: ${{ env.REGISTRY }}
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Extract Docker metadata
49+
id: meta
50+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
51+
with:
52+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
53+
54+
- name: Build Docker image
55+
run: |
56+
docker-compose -f docker-compose.yml build
57+
58+
- name: Push Docker image
59+
run: |
60+
docker-compose -f docker-compose.yml push

0 commit comments

Comments
 (0)