Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Contao-Docker-Tutorial - docker-compose.yml
# see: https://docs.docker.com/compose/compose-file/compose-file-v2/
version: '2.2'
services:
web:
image: ctsmedia/baseimage-web-apache:1.2.0
container_name: &hostname ${COMPOSE_PROJECT_NAME}.local
environment:
DOCKER_DOMAIN: *hostname
PROJECT_NAME: &project ${COMPOSE_PROJECT_NAME}
PHPFPM_HOST: &phpfpm_host php
DEFAULT_PASSWORD: &password ${GLOBAL_PASS_NAME}
DOCROOT: web
volumes_from:
- php
depends_on:
- db
- php
ports:
- "80:80"
php:
image: ${CONTAO_IMAGE}
container_name: ${COMPOSE_PROJECT_NAME}_contao
environment:
DEFAULT_PASSWORD: *password
PROJECT_NAME: *project
ports:
- "9000"
volumes:
- /var/www/share/project
- $PWD/src/files:/var/www/share/project/files
- $PWD/src/templates:/var/www/share/project/templates
# use volume to prevent file permission issues editing on host
- $PWD/${BACKUP_DIR}:/var/www/share/project/${BACKUP_DIR}
db:
image: mysql:5.7
container_name: ${COMPOSE_PROJECT_NAME}_db
environment:
MYSQL_ROOT_PASSWORD: *password
MYSQL_DATABASE: *password
MYSQL_USER: *password
MYSQL_PASSWORD: *password
# See: https://github.com/docker-library/mysql/issues/69#issuecomment-407334811
#command: --innodb-use-native-aio=0
# Call: http://[DOCKER-IP]:8080
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: ${COMPOSE_PROJECT_NAME}_phpMyAdmin
depends_on:
- db
ports:
- "8080:80"
# Call: http://[DOCKER-IP]:8081
#adminer:
# image: adminer
# container_name: ${COMPOSE_PROJECT_NAME}_adminer
# ports:
# - "8081:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.