forked from ppy/osu-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (64 loc) · 1.6 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
version: '3.4'
x-env: &x-env
CACHE_DRIVER: redis
COMPOSER_HOME: /data/osuweb/.docker/.composer
DB_HOST: db
ES_HOST: elasticsearch:9200
HOME: /data/osuweb/.docker
REDIS_HOST: redis
YARN_CACHE_FOLDER: /data/osuweb/.docker/.yarn
services:
nginx:
image: nginx:latest
depends_on:
- php
volumes:
- ./docker/nginx/nginx-osu-next:/etc/nginx/conf.d/default.conf
- .:/data/osuweb
ports:
- "${NGINX_PORT:-8080}:80"
db:
image: mysql:8.0
volumes:
- database:/var/lib/mysql
- ./bin/db_setup.sh:/docker-entrypoint-initdb.d/db_setup.sh
- ./docker/mysql/db_user.sql:/docker-entrypoint-initdb.d/db_user.sql
environment:
<<: *x-env
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ONETIME_PASSWORD: "yes"
command: --default-authentication-plugin=mysql_native_password
redis:
image: redis:latest
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.1
volumes:
- elasticsearch:/usr/share/elasticsearch/data
environment:
discovery.type: single-node
php:
build:
context: ./docker/php
depends_on:
- db
working_dir: /data/osuweb
volumes:
- .:/data/osuweb
user: ${UID:?err}
environment:
<<: *x-env
OSU_INSTALL_DEV: 1
OSU_SKIP_CACHE_PERMISSION_OVERRIDE: 1
command: ['./docker/php/start.sh', 'db:3306']
yarn:
image: node:8-alpine
volumes:
- .:/data/osuweb
environment:
<<: *x-env
user: ${UID:?err}
working_dir: /data/osuweb
command: sh -c "yarn && yarn run watch"
volumes:
database:
elasticsearch: