Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- nginx:
- image: nginx:1.19
- container_name: nginx
- restart: unless-stopped
- tty: true
- ports:
- - "5000:5000"
- volumes:
- - ./php-8.0/src:/var/www/backend-8.0
- - ./php-8.2/src:/var/www/backend-8.2
- - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- depends_on:
- - php-8.0
- - php-8.2
- - pgsql
- - mysql
- networks:
- - mynetwork
- pgsql:
- image: postgres:14
- container_name: pgsql-14
- restart: unless-stopped
- tty: true
- ports:
- - 5431:5432
- environment:
- POSTGRES_DATABASE: laravel
- POSTGRES_USER: admin
- POSTGRES_PASSWORD: admin1234
- POSTGRES_HOST_AUTH_METHOD: trust
- SERVICE_TAGS: dev
- SERVICE_NAME: pgsql
- volumes:
- - ./pgsql/postgresql.conf:/etc/postgresql/14/main/postgresql.conf
- - ./pgsql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
- networks:
- - mynetwork
- mysql:
- # platform: linux/amd64
- image: mysql
- container_name: mysql
- restart: unless-stopped
- tty: true
- ports:
- - "3306:3306"
- volumes:
- - ./mysql:/var/lib/mysql
- environment:
- MYSQL_DATABASE: laravel_docker
- MYSQL_USER: user
- MYSQL_PASSWORD: user
- MYSQL_ROOT_PASSWORD: root
- SERVICE_TAGS: dev
- SERVICE_NAME: mysql
- networks:
- - mynetwork
- php-8.0:
- build:
- context: .
- dockerfile: Dockerfile
- container_name: php-8.0
- restart: unless-stopped
- tty: true
- working_dir: /var/www/backend
- volumes:
- - ./php-8.0/src:/var/www/backend
- ports:
- - "9000:9000"
- networks:
- - mynetwork
- php-8.2:
- build:
- context: .
- dockerfile: Dockerfile-php-8.2
- container_name: php-8.2
- restart: unless-stopped
- tty: true
- working_dir: /var/www/backend
- volumes:
- - ./php-8.2/src:/var/www/backend
- ports:
- - "9001:9001"
- networks:
- - mynetwork
- volumes:
- postgres_data:
- mysql_data:
- networks:
- mynetwork:
- driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement