-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (75 loc) · 1.84 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
69
70
71
72
73
74
75
76
77
version: "3"
services:
#PHP Service
api-boilerplate:
build:
context: .
dockerfile: Dockerfile
image: digitalocean.com/php
container_name: api-boilerplate
restart: always
tty: true
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
APP_KEY: base64:TPTxTtLRf5q57od1Q3hUCazPEZMxPyxHwf6uv+5q7PU=
SERVICE_NAME: api-boilerplate
DB_CONNECTION: mysql
DB_HOST: db-boilerplate
DB_DATABASE: api-boilerplate
DB_PASSWORD: passwd
DB_PORT: 3306
DB_USERNAME: root
APP_ENV: local
APP_DEBUG: "true"
MAIL_MAILER: smtp
MAIL_HOST: smtp.mailtrap.io
MAIL_PORT: "2525"
MAIL_USERNAME: 52965b61d77f22
MAIL_PASSWORD: 40567fdc0ef352
MAIL_ENCRYPTION: tls
MAIL_FROM_ADDRESS: laravel@test.com
MAIL_FROM_NAME: "${APP_NAME}"
volumes:
- ./:/var/www
ports:
- 8008:80
networks:
- api-network
command: bash -c " (composer install || true) && (php artisan migrate || true) && (php artisan config:cache || true) && (php artisan route:clear || true) && php-fpm"
db-boilerplate:
image: mysql:5.7.22
container_name: api-db
restart: unless-stopped
tty: true
ports:
- "33090:3306"
environment:
MYSQL_DATABASE: api-boilerplate
MYSQL_ROOT_PASSWORD: "passwd"
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- dbdata:/var/www
- ./dockerfiles/nginx:/etc/nginx/conf.d
networks:
- api-network
nginx:
image: nginx:1.17-alpine
container_name: travellist-nginx
restart: unless-stopped
ports:
- 8000:80
volumes:
- ./:/var/www
- ./dockerfiles/nginx:/etc/nginx/conf.d
networks:
- api-network
#Docker Networks
networks:
api-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local