generated from dev/symfony-5-cli-template
Implementation a microservice architecture with JSON-RPC 2.0 communication between backend and frontend https://www.jsonrpc.org/specification
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
version: "3"
|
|
|
|
networks:
|
|
gate:
|
|
driver: bridge
|
|
|
|
services:
|
|
mysql:
|
|
image: mysql:5.7
|
|
restart: on-failure
|
|
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
|
MYSQL_DATABASE: ${COMPOSE_PROJECT_NAME}
|
|
ports:
|
|
- "3$PROJECT_ID:3306"
|
|
php:
|
|
build:
|
|
context: devops/docker/php
|
|
args:
|
|
HOME: "$HOME"
|
|
USER: "$USER"
|
|
UID: "$UID"
|
|
GID: "$GID"
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mysql
|
|
environment:
|
|
- COMPOSER_MEMORY_LIMIT=-1
|
|
- PHP_IDE_CONFIG=serverName=${COMPOSE_PROJECT_NAME}
|
|
- PROJECT_PORT="8$PROJECT_ID"
|
|
|
|
volumes:
|
|
- ./:/var/www/localhost/htdocs/current
|
|
- ${HOME}/.composer:${HOME}/.composer
|
|
- ${HOME}/.ssh:${HOME}/.ssh
|
|
expose:
|
|
- "9000"
|
|
nginx:
|
|
image: nginx:1.19
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- php
|
|
volumes:
|
|
- ./:/var/www/localhost/htdocs/current
|
|
- ./devops/docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
|
|
ports:
|
|
- "8$PROJECT_ID:80"
|
|
networks:
|
|
- default
|
|
- gate
|