Commit 854e3ba2 authored by Florian Heder's avatar Florian Heder

Add Docker settings for staging environment

parent 6968c154
version: "3"
services:
bdk-craft:
build:
context: ./php81
environment:
VIRTUAL_HOST: ${VIRTUAL_HOST}
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}
LETSENCRYPT_EMAIL: florian.heder@hebotek.at
LANG: de_DE.UTF-8
LC_ALL: de_DE.UTF-8
TZ: "Europe/Vienna"
volumes:
- ../:/var/website/current
depends_on:
- bdk-db
container_name: bdk-craft
restart: ${RESTART}
networks:
- backend
- default
bdk-db:
image: mysql:8.0
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
environment:
- "MYSQL_USER=${MYSQL_USER}"
- "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
- "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT}"
volumes:
- bdk-db:/var/lib/mysql
container_name: bdk-db
restart: ${RESTART}
networks:
- backend
volumes:
bdk-db:
networks:
default:
external:
name: nginx-proxy
backend:
###########################################################
###################### General Setup ######################
## Mysql Credentials ######################################
MYSQL_USER=bdkUser
MYSQL_PASSWORD=Il3nee9x
MYSQL_DATABASE=bdk
MYSQL_ROOT=eiT2chuuChah8eeh
###########################################################
## Restart behaviour ######################################
# (always | unless-stopped | no) always in prod mode
RESTART=unless-stopped
###########################################################
## Environment and URL Behaviour ##########################
## Setup the HTTP URL for your Server
## eg.: www.hebotek.at,hebotek.at,www.hebotek.org
VIRTUAL_HOST=bdk.localhost
## keep Letsencrypt Empty for non production sites -
## always test the regular virtual_host entry first
LETSENCRYPT_HOST=
#start:
# ./craft project-config/sync
# ./craft setup/security-key
\ No newline at end of file
# Docker image for TYPO3 CMS
# Copyright (C) 2016-2023 Martin Helmich <martin@helmich.me>
# and contributors <https://github.com/martin-helmich/docker-typo3/graphs/contributors>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# NOTE: This file is automatically generated from a template. Please
# do not make any changes to this file directly, and consult the
# CONTRIBUTING document, first.
FROM php:8.1-apache-bookworm
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"
# Install TYPO3/Craft CMS
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
wget \
git \
sudo \
nano \
vim \
# Configure PHP
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libpq-dev \
libzip-dev \
zlib1g-dev \
# Install required 3rd party tools
graphicsmagick && \
# Configure extensions
docker-php-ext-configure gd --with-libdir=/usr/include/ --with-jpeg --with-freetype && \
docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl pdo_mysql pdo bcmath && \
echo 'always_populate_raw_post_data = -1\nmax_execution_time = 240\nmax_input_vars = 1500\nupload_max_filesize = 32M\npost_max_size = 32M' > /usr/local/etc/php/conf.d/typo3.ini && \
# Configure Apache as needed
a2enmod rewrite && \
apt-get clean && \
apt-get -y purge \
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libzip-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN rm -rf /var/www/html && ln -sfn /var/website/current/web /var/www/html
WORKDIR /var/www/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment