cc-docker/docker-compose.yml
2021-09-10 17:34:20 +02:00

72 lines
2.5 KiB
YAML

services:
db:
container_name: cc-db
image: mysql:8.0.22
command: ["--default-authentication-plugin=mysql_native_password"]
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
cap_add:
- SYS_NICE
redis:
container_name: cc-redis
image: redis
command: [
"redis-server",
"--save", "",
"--maxmemory", "1gb",
"--maxmemory-policy", "allkeys-lru"]
php:
container_name: cc-php
build:
context: ./php-fpm
args:
PHP_XDEBUG_INIT: ${PHP_XDEBUG_INIT}
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE}
PHP_XDEBUG_CLIENT_PORT: ${PHP_XDEBUG_CLIENT_PORT}
PHP_XDEBUG_CLIENT_HOST: ${PHP_XDEBUG_CLIENT_HOST}
SYMFONY_CLI_VERSION: 4.23.2
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
LDAP_PASSWORD: ${LDAP_ADMIN_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_PORT: ${INFLUXDB_PORT}
INFLUXDB_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
APP_ENVIRONMENT: ${APP_ENVIRONMENT}
environment:
- APP_CLUSTERCOCKPIT_INIT=${APP_CLUSTERCOCKPIT_INIT}
volumes:
- ${DATADIR}/symfony:/var/www/symfony:cached
- ${DATADIR}/job-archive:/var/lib/job-archive:cached
depends_on:
- db
- redis
nginx:
container_name: cc-nginx
build:
context: ./nginx
args:
NGINX_SYMFONY_SERVER_NAME: ${NGINX_SYMFONY_SERVER_NAME}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
APP_ENVIRONMENT: ${APP_ENVIRONMENT}
ports:
- "127.0.0.1:${NGINX_PORT}:80"
depends_on:
- php
environment:
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
- NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/templates
- NGINX_ENVSUBST_TEMPLATE_SUFFIX=.template
- NGINX_SYMFONY_SERVER_NAME=${NGINX_SYMFONY_SERVER_NAME}
volumes:
- ${DATADIR}/symfony:/var/www/symfony:cached