Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- #PHP Service
- php:
- build:
- context: .
- dockerfile: Dockerfile
- image: digitalocean.com/php
- container_name: php
- restart: unless-stopped
- tty: true
- environment:
- SERVICE_NAME: php
- SERVICE_TAGS: dev
- working_dir: /var/www
- volumes:
- - ./:/var/www
- - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
- networks:
- - app-network
- #NODEJS Service
- nodejs:
- image: node:8.9
- container_name: nodejs
- restart: unless-stopped
- working_dir: /var/www
- volumes:
- - ./:/var/www
- tty: true
- networks:
- - app-network
- #Nginx Service
- nginx:
- image: nginx:alpine
- container_name: nginx
- restart: unless-stopped
- tty: true
- ports:
- - "80:80"
- - "443:443"
- volumes:
- - ./:/var/www
- - ./nginx/conf.d/:/etc/nginx/conf.d/
- networks:
- - app-network
- #MySQL Service
- mysqldb:
- image: mysql:5.7.22
- container_name: mysqldb
- restart: unless-stopped
- tty: true
- ports:
- - "3306:3306"
- environment:
- MYSQL_DATABASE: ${DB_DATABASE}
- MYSQL_USER: ${DB_USERNAME}
- MYSQL_PASSWORD: ${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
- SERVICE_TAGS: dev
- SERVICE_NAME: mysql
- volumes:
- - dbdata:/var/lib/mysql
- - ./mysql/my.cnf:/etc/mysql/my.cnf
- networks:
- - app-network
- #MongoDB Service
- mongodb:
- image: mongo:3
- container_name: mongodb
- restart: unless-stopped
- tty: true
- ports:
- - "27017:27017"
- networks:
- - app-network
- #Docker Networks
- networks:
- app-network:
- driver: bridge
- #Volumes
- volumes:
- dbdata:
- driver: local
Add Comment
Please, Sign In to add comment