-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·55 lines (50 loc) · 1.13 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
version: '3'
networks:
laravel:
services:
nginx:
networks:
- laravel
image: nginx:stable-alpine
ports:
- 80:80
depends_on:
- database
- php
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
- ${NGINX_CONF_HOST_PATH}:${NGINX_CONF_CONTAINER_PATH}
database:
container_name: database
restart: unless-stopped
networks:
- laravel
image: mysql:latest
environment:
MYSQL_DATABASE: advertisements
MYSQL_USER: advertisements_db_user
MYSQL_PASSWORD: blablabla
MYSQL_ROOT_PASSWORD: secret
ports:
- 3306:3306
volumes:
- ${DB_PATH_HOST}:${DB_PATH_CONTAINER}
php:
networks:
- laravel
build:
context: .
dockerfile: Dockerfile
ports:
- 8080:8080
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
working_dir: ${APP_PATH_CONTAINER}
composer:
networks:
- laravel
image: composer:latest
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
working_dir: ${APP_PATH_CONTAINER}
command: composer install