Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: "3.1"
- networks:
- nginx-php8-mysql-vue:
- services:
- # nginx
- nginx:
- image: nginx:stable-alpine
- container_name: nginx-container
- ports:
- - "8000:8000"
- volumes:
- - ./server:/var/www/project
- - ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- depends_on:
- - php
- - mysql
- networks:
- - nginx-php8-mysql-vue
- # php
- php:
- build:
- context: .
- dockerfile: ./.docker/php/Dockerfile
- container_name: php-8-container
- ports:
- - "9000:9000"
- volumes:
- - ./server
- networks:
- - nginx-php8-mysql-vue
- # mysql
- mysql:
- image: mysql:8
- container_name: mysql-container
- ports:
- - "3306:3306"
- volumes:
- - ./.docker/mysql:/var/lib/mysql
- command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- restart: always # always restart unless stopped manually
- environment:
- MYSQL_USER: root
- MYSQL_ROOT_PASSWORD: secret
- MYSQL_PASSWORD: secret
- networks:
- - nginx-php8-mysql-vue
- # vue
- vue:
- build:
- context: .
- dockerfile: ./.docker/vue/Dockerfile
- container_name: vue-container
- ports:
- - "8080:8080"
- volumes:
- - ./client
- depends_on:
- - nginx
- - php
- - mysql
- networks:
- - nginx-php8-mysql-vue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement