Skip to content

Instantly share code, notes, and snippets.

@mrcat323
Created July 6, 2020 13:45
Show Gist options
  • Save mrcat323/20e2a8dc65d3d9726493249b613bd94e to your computer and use it in GitHub Desktop.
Save mrcat323/20e2a8dc65d3d9726493249b613bd94e to your computer and use it in GitHub Desktop.
version: '3.7'
services:
app:
build:
args:
user: sammy
uid: 1000
context: ./
dockerfile: Dockerfile
image: app-laravel
container_name: app-laravel
restart: unless-stopped
working_dir: /var/www
volumes:
- ./:/var/www
networks:
- docker-laravel
supervisor:
image: app-laravel
container_name: supervisor
restart: always
working_dir: /var/www
entrypoint: ['/usr/bin/supervisord', '-n', '-c', '/etc/supervisord.conf']
volumes:
- ./docker-compose/supervisor/supervisord.conf:/etc/supervisord.conf
- ./docker-compose/supervisor/websockets.conf:/etc/supervisor/conf.d/websockets.conf
ports:
- 6001:6001
networks:
- docker-laravel
db:
image: mysql:5.7
container_name: db_mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: jojo
MYSQL_USER: root
MYSQL_PASSWORD: jojo
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- db_data:/var/lib/mysql
networks:
- docker-laravel
yarn:
image: node:10-alpine
container_name: npm
restart: on-failure
working_dir: /var/www
entrypoint: ['yarn']
volumes:
- ./:/var/www
networks:
- docker-laravel
nginx:
image: nginx:latest
container_name: nginx_laravel
ports:
- 9999:80
restart: unless-stopped
volumes:
- ./:/var/www
- ./docker-compose/nginx:/etc/nginx/conf.d
- ./docker-compose/nginx/logs:/var/log/nginx/
networks:
- docker-laravel
phpmyadmin:
depends_on:
- db
container_name: phpmyadmin_laravel
image: phpmyadmin/phpmyadmin:latest
environment:
PMA_DB_HOST: db:3306
MYSQL_ROOT_PASSWORD: tashkentkiller
restart: always
ports:
- 8585:80
networks:
- docker-laravel
networks:
docker-laravel:
driver: 'bridge'
volumes:
db_data: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment