Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Create a docker-compose file , and paste this code inside.
- ## Create a directory with name "App" on root of docker-compose file.
- ## Run docker-compose up -d to run theses containers.
- ## Acess the container "app-php" : docker exec -it app-php bash .
- ## Check if you are on "var/www" directory. If is , run composer install.
- ### FOR PHP, COMPOSER, ETC
- app-php:
- image: 271217/felix-php-fpm-node
- container_name: app-php
- restart: unless-stopped
- working_dir: /var/www
- volumes:
- - ./App/:/var/www
- ## for FPM
- php-fpm:
- image: 271217/felix-php-fpm
- container_name: php-fpm
- restart: unless-stopped
- working_dir: /var/www
- ports:
- - "9000"
- volumes:
- - ./App/:/var/www
- - ./docker-compose/php/php-fpm.conf:/etc/php7/php-fpm.conf
- ## FOR NGINX
- nginx:
- image: nginx:1.17-alpine
- container_name: nginx
- restart: unless-stopped
- ports:
- - 80:80
- links:
- - cannoplus-fpm
- volumes:
- - ./App/:/var/www
- - ./docker-compose/nginx/vhost.conf:/etc/nginx/conf.d/default.conf
- - ./docker-compose/nginx/nginx.conf:/etc/nginx/nginx.conf
- - /var/run/docker.sock:/tmp/docker.sock:ro
- ## FOR DATABASE
- app-db:
- image: mariadb
- container_name: app-db
- restart: unless-stopped
- volumes:
- - -db-data:/var/lib/mysql/
- ports:
- - 3306:3306
- environment:
- MYSQL_ROOT_PASSWORD: As32312##dasd!alsae
- MARIADB_USER: meuUser
- MARIADB_PASSWORD: As32##asd1311!alsae
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement