From: Vincent Vanwaelscappel Date: Thu, 31 Oct 2024 14:51:13 +0000 (+0100) Subject: wip #7168 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=af88c05da10e26d29b30461b543c9b645d2ef6ce;p=psq.git wip #7168 @2 --- diff --git a/.docker/production/docker-compose.yml b/.docker/production/docker-compose.yml index c878823..ca91dc0 100644 --- a/.docker/production/docker-compose.yml +++ b/.docker/production/docker-compose.yml @@ -1,113 +1,146 @@ version: '3.1' services: - webserver: - container_name: presquot-httpd - build: './www/.docker/images/httpd' - working_dir: /application - volumes: - - './www/public:/usr/local/apache2/htdocs' - - './www/:/application/' - - './www/.docker/config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf' - environment: - VIRTUAL_HOST: admin.presquot.dev.cubedesigners.com,presquot.dev.cubedesigners.com - LETSENCRYPT_HOST: presquot.dev.cubedesigners.com,presquot.dev.cubedesigners.com - networks: - - presquot - restart: unless-stopped - php-fpm: - container_name: presquot - hostname: presquot - build: './www/.docker/images/php-fpm' - working_dir: /application - volumes: - # SSH - - './www/.docker/config/ssh/root/:/root/.ssh/' - - './www/.docker/config/ssh/user/:/application/.ssh/' - - './www/.docker/config/ssh/server/:/etc/ssh/' - # Rsyslog - - './www/.docker/config/rsyslog/rsyslog.conf:/etc/rsyslog.conf' - - './www/.docker/config/rsyslog/50-default.conf:/etc/rsyslog.d/50-default.conf' - # Composer - - './www/.docker/config/composer/:/root/.config/composer/' - - './www/.docker/config/composer/:/application/.config/composer/' - # Sudoers - - './www/.docker/config/sudoers:/etc/sudoers.d/presquot' - # ImageMagick - - './www/.docker/config/imagemagick/policy.xml:/etc/ImageMagick-6/policy.xml' - # Passwords - - './www/.docker/config/passwords:/root/passwords' - # Cron - - './www/.docker/config/cron/crontab:/etc/crontab' - # PHP - - './www/.docker/config/php.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini' - # ENV - - './www/.env.production:/application/.env' - # Web path - - './www:/application' - ports: - - '43441:22' - networks: - - presquot - restart: unless-stopped + webserver: + container_name: presquot-httpd + build: './www/.docker/images/httpd' + working_dir: /application + depends_on: + - php-fpm + volumes: + - './www/public:/usr/local/apache2/htdocs' + - './www/:/application/' + - './www/.docker/config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf' + environment: + VIRTUAL_HOST: admin.presquot.dev.cubedesigners.com,presquot.dev.cubedesigners.com + LETSENCRYPT_HOST: presquot.dev.cubedesigners.com,presquot.dev.cubedesigners.com + networks: + - presquot + restart: unless-stopped + php-fpm: + container_name: presquot + hostname: presquot + build: './www/.docker/images/php-fpm' + working_dir: /application + depends_on: + - mariadb + - redis + - minio + volumes: + # SSH + - './www/.docker/config/ssh/root/:/root/.ssh/' + - './www/.docker/config/ssh/user/:/application/.ssh/' + - './www/.docker/config/ssh/server/:/etc/ssh/' + # Rsyslog + - './www/.docker/config/rsyslog/rsyslog.conf:/etc/rsyslog.conf' + - './www/.docker/config/rsyslog/50-default.conf:/etc/rsyslog.d/50-default.conf' + # Composer + - './www/.docker/config/composer/:/root/.config/composer/' + - './www/.docker/config/composer/:/application/.config/composer/' + # Sudoers + - './www/.docker/config/sudoers:/etc/sudoers.d/presquot' + # ImageMagick + - './www/.docker/config/imagemagick/policy.xml:/etc/ImageMagick-6/policy.xml' + # Passwords + - './www/.docker/config/passwords:/root/passwords' + # Cron + - './www/.docker/config/cron/crontab:/etc/crontab' + # PHP + - './www/.docker/config/php.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini' + # ENV + - './www/.env.production:/application/.env' + # Web path + - './www:/application' + ports: + - '43441:22' + networks: + - presquot + restart: unless-stopped - adminer: - image: 'shyim/adminerevo' - container_name: presquot-adminer - restart: unless-stopped - volumes: - - "./www/.docker/config/adminer/php.ini:/etc/php/conf.d/99-adminer.ini" - environment: - ADMINER_DEFAULT_SERVER: presquot-mariadb - VIRTUAL_HOST: adminer.presquot.dev.cubedesigners.com - LETSENCRYPT_HOST: adminer.presquot.dev.cubedesigners.com - networks: - - presquot + minio: + image: 'minio/minio:latest' + container_name: presquot-s3 + networks: + - presquot + environment: + VIRTUAL_HOST: s3.presquot.dev.cubedesigners.com + VIRTUAL_PORT: 9000 + VIRTUAL_HOST_MULTIPORTS: |- + s3.presquot.dev.cubedesigners.com: + "/": + port: 9000 + s3.presquot.dev.cubedesigners.com: + "/console": + port: 8900 + LETSENCRYPT_HOST: s3.presquot.dev.cubedesigners.com + MINIO_ROOT_USER: root + MINIO_ROOT_PASSWORD: jH3zZm5TjX7cg4Lomt6N + volumes: + - './s3:/data/minio' + command: 'minio server /data/minio --console-address ":8900"' + restart: unless-stopped - mariadb: - container_name: presquot-mariadb - image: 'mariadb:latest' - restart: unless-stopped - environment: - MARIADB_ROOT_PASSWORD: 35z8556x1KVZ8p3q - MARIADB_DATABASE: presquot - MARIADB_AUTO_UPGRADE: 1 - volumes: - - "./www/.docker/config/adminer/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini" - - "./database/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz" - - "./database/scripts/:/usr/local/bin/scripts/" - - "./database/data:/var/lib/mysql" - - './www/.docker/config/mariadb:/etc/mysql/conf.d:z' - networks: - - presquot - logging: - driver: json-file - options: - max-size: 10M - max-file: 10 + adminer: + image: 'shyim/adminerevo' + container_name: presquot-adminer + restart: unless-stopped + depends_on: + - mariadb + volumes: + - "./www/.docker/config/adminer/php.ini:/etc/php/conf.d/99-adminer.ini" + environment: + ADMINER_DEFAULT_SERVER: presquot-mariadb + VIRTUAL_HOST: adminer.presquot.dev.cubedesigners.com + LETSENCRYPT_HOST: adminer.presquot.dev.cubedesigners.com + networks: + - presquot - mysqlbackup: - image: selim13/automysqlbackup - container_name: presquot-automysqlbackup - volumes: - - "./database/backup:/backup" - environment: - USERNAME: root - PASSWORD: 35z8556x1KVZ8p3q - DBHOST: presquot-mariadb - DBEXCLUDE: "performance_schema information_schema" - CRON_SCHEDULE: "0 0 * * *" - EXTRA_OPTS: "--single-transaction" - networks: - - presquot + mariadb: + container_name: presquot-mariadb + image: 'mariadb:latest' + restart: unless-stopped + environment: + MARIADB_ROOT_PASSWORD: 35z8556x1KVZ8p3q + MARIADB_DATABASE: presquot + MARIADB_AUTO_UPGRADE: 1 + volumes: + - "./www/.docker/config/adminer/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini" + - "./database/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz" + - "./database/scripts/:/usr/local/bin/scripts/" + - "./database/data:/var/lib/mysql" + - './www/.docker/config/mariadb:/etc/mysql/conf.d:z' + networks: + - presquot + logging: + driver: json-file + options: + max-size: 10M + max-file: 10 - redis: - container_name: presquot-redis - image: redis - volumes: - - './redis/data:/data' - networks: - - presquot - restart: unless-stopped + mysqlbackup: + image: selim13/automysqlbackup + container_name: presquot-automysqlbackup + depends_on: + - mariadb + volumes: + - "./database/backup:/backup" + environment: + USERNAME: root + PASSWORD: 35z8556x1KVZ8p3q + DBHOST: presquot-mariadb + DBEXCLUDE: "performance_schema information_schema" + CRON_SCHEDULE: "0 0 * * *" + EXTRA_OPTS: "--single-transaction" + networks: + - presquot + + redis: + container_name: presquot-redis + image: redis + volumes: + - './redis/data:/data' + networks: + - presquot + restart: unless-stopped networks: presquot: