From 6a7de3fcf85cfae5d9a4f784f11f6ea2248f4917 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Wed, 18 Sep 2024 11:18:39 -0400 Subject: [PATCH] Split staging and dev to no longer fight apache bug --- conf/dev.tabroom.com.conf | 30 ++++++++++++++++++++++++++++++ docker-compose.dev.yml | 13 ++++++------- docker-compose.staging.yml | 26 ++++++++++++++++++++++++++ docker-compose.yml | 2 +- 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 conf/dev.tabroom.com.conf create mode 100644 docker-compose.staging.yml diff --git a/conf/dev.tabroom.com.conf b/conf/dev.tabroom.com.conf new file mode 100644 index 0000000..8d0a099 --- /dev/null +++ b/conf/dev.tabroom.com.conf @@ -0,0 +1,30 @@ + + ServerAdmin webmaster@tabroom.com + + DocumentRoot /www/tabroom/web + ErrorLog /var/log/apache2/dev-tabroom-error.log + CustomLog /var/log/apache2/dev-tabroom-access.log combined + + DirectoryIndex index.html index.mhtml + AddType text/html .mhtml + + PerlRequire /www/tabroom/web/lib/handler.pl + Redirect /closet "/index/index.mhtml?closet=1" + + Alias /favicon.ico /www/tabroom/web/lib/images/favicon.ico + + + SetHandler perl-script + PerlHandler Tab::Mason + + + + Require all denied + + + + + AllowOverride FileInfo AuthConfig Limit + Options MultiViews Indexes FollowSymLinks ExecCGI + Require all granted + diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 83e7f08..08e2dc1 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,27 +1,26 @@ version: '3' services: tabroom: - container_name: mason + container_name: mason-dev build: context: . dockerfile: Dockerfile - image: mason:latest + image: mason-dev:latest restart: always ports: - - 9000:80 - env_file: .env + - 8000:80 volumes: - ${TABROOM_WEB:-/www/tabroom/web}:/www/tabroom/web:rw - ${TABROOM_WEB_MASON:-/www/tabroom/web/mason}:/www/tabroom/web/mason:rw - ${TABROOM_WEB_TMP:-/www/tabroom/web/tmp}:/www/tabroom/web/tmp:rw - ${TABROOM_PROFILES:-/www/profiles}:/www/profiles:rw - ${TABROOM_LOGS:-/var/log/apache2}:/var/log/apache2:rw - - ${TABROOM_GENERAL:-/etc/tabroom/General.pm}:/www/tabroom/web/lib/Tab/General.pm:ro - - ./conf/staging.tabroom.com.conf:/etc/apache2/sites-enabled/staging.tabroom.com.conf:ro + - ${TABROOM_GENERAL:-/etc/tabroom/General.dev.pm}:/www/tabroom/web/lib/Tab/General.pm:ro + - ./conf/dev.tabroom.com.conf:/etc/apache2/sites-enabled/dev.tabroom.com.conf:ro - ./conf/envvars:/etc/apache2/envvars:ro - ./conf/apache2.conf:/etc/apache2/apache2.conf:ro - ./conf/perl.conf:/etc/apache2/mods-enabled/perl.conf:ro - ./conf/mpm_prefork.conf:/etc/apache2/mods-enabled/mpm_prefork.conf:ro extra_hosts: - "host.docker.internal:host-gateway" - - "staging-api.tabroom.com:host-gateway" + - "api.dev.tabroom.com:host-gateway" diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml new file mode 100644 index 0000000..1b9f141 --- /dev/null +++ b/docker-compose.staging.yml @@ -0,0 +1,26 @@ +version: '3' +services: + tabroom: + container_name: mason-staging + build: + context: . + dockerfile: Dockerfile + image: mason-staging:latest + restart: always + ports: + - 9000:80 + volumes: + - ${TABROOM_WEB:-/www/tabroom/web}:/www/tabroom/web:rw + - ${TABROOM_WEB_MASON:-/www/tabroom/web/mason}:/www/tabroom/web/mason:rw + - ${TABROOM_WEB_TMP:-/www/tabroom/web/tmp}:/www/tabroom/web/tmp:rw + - ${TABROOM_PROFILES:-/www/profiles}:/www/profiles:rw + - ${TABROOM_LOGS:-/var/log/apache2}:/var/log/apache2:rw + - ${TABROOM_GENERAL:-/etc/tabroom/General.pm}:/www/tabroom/web/lib/Tab/General.pm:ro + - ./conf/staging.tabroom.com.conf:/etc/apache2/sites-enabled/staging.tabroom.com.conf:ro + - ./conf/envvars:/etc/apache2/envvars:ro + - ./conf/apache2.conf:/etc/apache2/apache2.conf:ro + - ./conf/perl.conf:/etc/apache2/mods-enabled/perl.conf:ro + - ./conf/mpm_prefork.conf:/etc/apache2/mods-enabled/mpm_prefork.conf:ro + extra_hosts: + - "host.docker.internal:host-gateway" + - "api.staging.tabroom.com:host-gateway" diff --git a/docker-compose.yml b/docker-compose.yml index 7ef13e4..02a3bd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,4 +19,4 @@ services: - /etc/tabroom/General.pm:/www/tabroom/web/lib/Tab/General.pm:ro extra_hosts: - "host.docker.internal:host-gateway" - - "staging-api.tabroom.com:host-gateway" + - "api.staging.tabroom.com:host-gateway"