-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (63 loc) · 1.92 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '3'
networks:
laravel:
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
ports:
- "8080:80" # Laravel App will run at port 8080
volumes:
- ./src:/var/www # the src is the title of your laravel project folder
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- mysql
networks:
- laravel
mysql:
image: mysql:5.7.22
container_name: mysql
restart: unless-stopped
tty: true
ports:
- "3306:3306" # mysql port
environment:
MYSQL_DATABASE: YOUR_DATABASE_NAME
MYSQL_USER: YOUR_PREFERRED_MYSQL_USER
MYSQL_PASSWORD: YOUR_PREFERRED PASSWORD
MYSQL_ROOT_PASSWORD: YOUR_PREFERRED
SERVICE_TAGS: dev
SERVIVE_NAME: mysql # This service name will be referenced in your .env file for database
networks:
- laravel
mongo:
container_name: mongo
image: mongo
environment:
# provide your credentials here
MONGO_INITDB_ROOT_USERNAME: YOUR_PREFERRED_MONGO_USER
MONGO_INITDB_ROOT_PASSWORD: YOUR_PREFERRED_MONGO_USER_PASSWORD
MONGO_INITDB_DATABASE: YOUR_DATABASE_NAME
ports:
- "27017:27017" # Mongo Port
networks:
- laravel
redis:
container_name: redis
image: redis
ports:
- "6379:6379" # Redis Port
networks:
- laravel
php:
build:
context: .
dockerfile: Dockerfile # Dockerfile for the build
container_name: php
volumes:
- ./src:/var/www # the src is the title of your laravel project folder
ports:
- "9000:9000" # PHP Port
networks:
- laravel