Last active
March 14, 2023 14:16
-
-
Save neerfix/33e0f83b5d6882b5bbd7ddaae1b55941 to your computer and use it in GitHub Desktop.
Example of docker-compose for symfony project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
web: | |
image: nginx:latest | |
ports: | |
- "9080:80" | |
volumes: | |
- .:/app:cached | |
- .docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf | |
depends_on: | |
- "php" | |
php: | |
build: .docker/php | |
working_dir: /app | |
volumes: | |
- .:/app:cached | |
- ./vendor:/app/vendor | |
environment: | |
APP_ENV: dev | |
depends_on: | |
- mysql | |
mysql: | |
ports: | |
- "9306:3306" | |
image: mysql:8.0.30 | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: www | |
TZ: Europe/Paris | |
volumes: | |
- db_data:/var/lib/mysql | |
depends_on: | |
- "redis" | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
depends_on: | |
- mysql | |
ports: | |
- "9980:80" | |
links: | |
- mysql | |
environment: | |
PMA_HOSTS: mysql | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment