forked from laravel/lumen
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
70 lines (66 loc) · 1.42 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
# Usefull links
# =============
# https://hub.docker.com/_/php/
# https://docs.docker.com/compose/overview/
# https://docs.docker.com/compose/compose-file/
#
# Usefull commands
# ================
#
# Start containers
# $ docker-compose up -d
#
# View running containers
# $ docker-compose ps
#
# Connect into command line of running container
# $ docker-compose run <container_name> bash
# where <name> could be fpm_shot, web_shot, db_shot.
# Container `fpm_shot` is most interesting as it has PHP, application code and connection to databse.
# Tip: `Ctrl+p` + `Ctrl+q` + `Enter` (to exit container bash)
#
# View docker logs
# $ docker-compose logs
#
# Stop containers
# $ docker-compose down
#
# Remove images
# $ docker rmi limoncelloshot_fpm
web:
image: nginx
container_name: web_shot
ports:
- "8080:80"
links:
- fpm
volumes:
- .:/app
- ./docker/nginx.site:/etc/nginx/conf.d/default.conf:ro
- ./docker/.env.app:/app/.env:ro
fpm:
build: ./docker/fpm
container_name: fpm_shot
links:
- db
- logs
volumes:
- .:/app
- ./docker/.env.app:/app/.env:ro
working_dir: /app
db:
image: percona
container_name: db_shot
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: shot
MYSQL_PASSWORD: secret
MYSQL_DATABASE: shot
logs:
image: graylog2/allinone
container_name: logs_shot
ports:
- "8090:9000"
environment:
GRAYLOG_USERNAME: admin
GRAYLOG_PASSWORD: admin