cc-docker/docker-compose.yml

84 lines
2.9 KiB
YAML
Raw Normal View History

2021-05-19 14:27:44 +02:00
services:
db:
container_name: cc-db
2021-05-19 14:27:44 +02:00
image: mysql:8.0.22
command: ["--default-authentication-plugin=mysql_native_password"]
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ClusterCockpit
MYSQL_USER: symfony
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
# - ${DATADIR}/sql:/var/lib/mysql
2021-06-09 09:53:35 +02:00
- ${DATADIR}/sql:/docker-entrypoint-initdb.d
2021-05-19 14:27:44 +02:00
influxdb:
container_name: cc-influxdb
2021-05-19 14:27:44 +02:00
image: influxdb
command: ["--reporting-disabled"]
ports:
- "127.0.0.1:${INFLUXDB_PORT}:8086"
2021-05-19 14:27:44 +02:00
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: symfony
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
DOCKER_INFLUXDB_INIT_ORG: ClusterCockpit
DOCKER_INFLUXDB_INIT_BUCKET: ClusterCockpit
DOCKER_INFLUXDB_INIT_RETENTION: 2w
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
# volumes:
# - ${DATADIR}/influxdb/data:/var/lib/influxdb2
# - ${DATADIR}/influxdb/config:/etc/influxdb2
2021-05-19 14:27:44 +02:00
php:
container_name: cc-php
2021-05-19 14:27:44 +02:00
build:
context: ./php-fpm
args:
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_PASSWORD: ${MYSQL_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
APP_ENVIRONMENT: ${APP_ENVIRONMENT}
2021-06-09 09:53:35 +02:00
environment:
- APP_CLUSTERCOCKPIT_INIT=${APP_CLUSTERCOCKPIT_INIT}
2021-05-19 14:27:44 +02:00
volumes:
2021-06-09 09:53:35 +02:00
- ${DATADIR}/symfony:/var/www/symfony:cached
- ${DATADIR}/job-archive:/var/lib/job-archive:cached
2021-05-19 14:27:44 +02:00
depends_on:
- db
- influxdb
phpmyadmin:
image: cc-phpmyadmin
2021-05-19 14:27:44 +02:00
container_name: phpmyadmin
environment:
- PMA_HOST=db
- PMA_USER=root
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- "127.0.0.1:${PHPMYADMIN_PORT}:80"
2021-05-19 14:27:44 +02:00
restart: always
nginx:
container_name: cc-nginx
2021-05-19 14:27:44 +02:00
build:
context: ./nginx
args:
NGINX_SYMFONY_SERVER_NAME: ${NGINX_SYMFONY_SERVER_NAME}
2021-05-21 08:08:04 +02:00
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
2021-05-19 14:27:44 +02:00
ports:
- "127.0.0.1:${NGINX_PORT}:80"
2021-05-19 14:27:44 +02:00
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:
2021-06-09 09:53:35 +02:00
- ${DATADIR}/symfony:/var/www/symfony:cached