-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·69 lines (67 loc) · 1.8 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
version: "3.7"
services:
app-api:
build:
args:
user: ${SERVER_USER:-foulen}
uid: ${SERVER_USER_UID:-1000}
context: ./
dockerfile: Dockerfile
image: app
container_name: app-api
restart: unless-stopped
working_dir: /var/www/
command: bash -c "composer install && php artisan migrate && php artisan storage:link && php-fpm"
depends_on:
- app-db
volumes:
- ./:/var/www
- ./storage:/var/www/storage
networks:
- app-api
- app-web
app-db:
image: mysql:8.0
container_name: app-db
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE-database}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD-password}
MYSQL_PASSWORD: ${DB_PASSWORD-password}
MYSQL_USER: ${DB_USERNAME-foulen}
ports:
- ${FORWARD_DB_PORT-33066}:3306
networks:
- app-api
volumes:
- app-db-storage:/var/lib/mysql
app-web:
image: nginx:alpine
container_name: app-web
restart: unless-stopped
depends_on:
- app-api
ports:
- ${APP_PORT-8000}:80
volumes:
- ./:/var/www
- ./storage:/var/www/storage
- ./docker/nginx:/etc/nginx/conf.d/
networks:
- app-web
app-mail:
image: mailhog/mailhog
container_name: app-mail
ports:
- ${MAIL_PORT-8003}:1025
- ${MAILHOG_PORT-8100}:8025
networks:
- app-api
networks:
app-api:
driver: bridge
app-web:
driver: bridge
volumes:
app-db-storage:
name: app-db-storage