Standardize Tukutoi deployment layout
This commit is contained in:
commit
e3c55c12b8
6 files changed
+117
No files matched your search
@@ -0,0 +1,2 @@
|
||||
**
|
||||
!Dockerfile
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
.DS_Store
|
||||
*.log
|
||||
*.sql
|
||||
*.sql.gz
|
||||
*.dump
|
||||
*.key
|
||||
*.pem
|
||||
.gnupg/
|
||||
secrets/
|
||||
html/
|
||||
tmp/
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y gnupg2 libgpgme-dev && \
|
||||
pecl install gnupg && \
|
||||
docker-php-ext-enable gnupg
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
@@ -0,0 +1,23 @@
|
||||
# Tukutoi Validate
|
||||
|
||||
Tukutoi Validate runs the PHP/Apache validation website at https://billing.tukutoi.com with GnuPG support.
|
||||
|
||||
## Deployment layout
|
||||
|
||||
- **Compose:** `/srv/docker/tukutoi-validate/docker-compose.yml`
|
||||
- **Static configuration/source:** `/srv/docker/tukutoi-validate/Dockerfile` and `/srv/docker/tukutoi-validate/apache.conf`; a separate application source repository has not yet been established
|
||||
- **Non-secret environment:** `GNUPGHOME=/var/www/.gnupg`, declared inline in Compose
|
||||
- **Secrets:** `/srv/docker/secrets/tukutoi-validate/gnupg`, mounted at `/var/www/.gnupg`
|
||||
- **NVMe application state:** `/srv/appdata/tukutoi-validate/html` for deployed application files and `/srv/appdata/tukutoi-validate/tmp` for temporary processing
|
||||
- **Bulk HDD data:** none required by the migrated deployment
|
||||
- **Other mounts:** none
|
||||
|
||||
Secrets are never committed to this deployment repository. Preserve the GnuPG home with numeric ownership `33:33` and directory mode `0700`. Temporary processing retains ownership `33:33` and directory mode `0770`.
|
||||
|
||||
The temporary directory is mounted at `/var/www/html/tmp`. Apache denies direct HTTP access; PHP serves authorized downloads through `download.php`, then deletes the downloaded file and its companion GPG file. Cleanup of abandoned files remains unverified.
|
||||
|
||||
## Dependencies and recovery
|
||||
|
||||
- **Networks/dependencies:** external `npm_proxy`, fixed address `192.168.99.15`, existing reverse proxy and DNS for billing.tukutoi.com, and the locally built `tukutoi-validate-tukutoi` image
|
||||
- **Back up:** deployed application files, the complete GnuPG home, and deployment configuration; no separate application source repository is currently established
|
||||
- **Re-creatable:** the PHP/Apache/GnuPG image from the Dockerfile, subject to upstream dependency availability; temporary files are transient but may belong to in-progress processing or downloads
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
<Directory /var/www/html>
|
||||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
# Temporary files are served only through the PHP download handler.
|
||||
<Directory /var/www/html/tmp>
|
||||
AllowOverride None
|
||||
Require all denied
|
||||
</Directory>
|
||||
@@ -0,0 +1,48 @@
|
||||
name: tukutoi-validate
|
||||
|
||||
services:
|
||||
tukutoi:
|
||||
image: tukutoi-validate-tukutoi
|
||||
build:
|
||||
context: .
|
||||
network: host
|
||||
container_name: tukutoi
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
GNUPGHOME: /var/www/.gnupg
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /srv/docker/tukutoi-validate/apache.conf
|
||||
target: /etc/apache2/sites-available/000-default.conf
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: /srv/appdata/tukutoi-validate/html
|
||||
target: /var/www/html
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: /srv/appdata/tukutoi-validate/tmp
|
||||
target: /var/www/html/tmp
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: /srv/docker/secrets/tukutoi-validate/gnupg
|
||||
target: /var/www/.gnupg
|
||||
bind:
|
||||
create_host_path: false
|
||||
networks:
|
||||
npm_proxy:
|
||||
ipv4_address: 192.168.99.15
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- CHOWN
|
||||
- SETGID
|
||||
- SETUID
|
||||
- DAC_OVERRIDE
|
||||
|
||||
networks:
|
||||
npm_proxy:
|
||||
external: true
|
||||
Reference in new issue
Block a user