-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (64 loc) · 2.18 KB
/
docker-compose.yml
File metadata and controls
72 lines (64 loc) · 2.18 KB
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
# during to work, all containers have internal lan, and have DNS names like their names. So you can to connect to container directly by his DNS name
# So you can connect to php container to port 9000 from another container with "php:9000" (see nginx site config for example) because this container has DNS name "php"
version: "3.5"
services:
# nginx service configuration. Use "alpine" versions because it has very small volumes
# WARNING: you can't use apt-get commands in alpine containers, so use it only if you want fully standard functionality
nginx:
image: nginx:mainline-alpine
container_name: ${APPNAME}_nginx
working_dir: ${SITE_WORKDIR_IN_CONTAINER}
ports:
- 80:80
volumes:
- ./..:/var/www
- /mnt/volume-hel1-1:/mnt/volume-hel1-1
- ./sites-enabled:/etc/nginx/sites-enabled
- ./nginx_php/config/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- php73
links:
- php73
restart: always
php73:
container_name: ${APPNAME}_php
build:
context: ./php
ports:
- 9000:9000
working_dir: ${SITE_WORKDIR_IN_CONTAINER}
volumes:
- /mnt/volume-hel1-1:/mnt/volume-hel1-1
- ./..:${SITE_WORKDIR_IN_CONTAINER}
- ./php/php.ini:/etc/php/fpm/php.ini
- ./php/php.ini:/usr/local/etc/php/php.ini
- ./../stellium/current/build/stellium/workers/stage:/etc/supervisor/conf.d/
links:
- db
restart: always
db:
image: mysql:${MYSQL_VERSION}
container_name: ${APPNAME}_mysql
ports:
- 3306:3306 #host:container
volumes:
- ./database/db_file:/var/lib/mysql
working_dir: ${SITE_WORKDIR_IN_CONTAINER}
environment:
- MYSQL_ROOT_PASSWORD=${SQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${SQL_DATABASE}
- MYSQL_USER=${SQL_USER}
- MYSQL_PASSWORD=${SQL_PASSWORD}
# command needed for default encoding= utf8
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: always
memcached:
container_name: ${APPNAME}_memcached
image: memcached:1.5.16-alpine
ports:
- 11211:11211
redis:
container_name: ${APPNAME}_redis
image: redis:5-alpine
ports:
- 6379:6379