forked from biigle/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (72 loc) · 1.66 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
71
72
73
74
75
76
77
78
79
version: '2.2'
services:
# The application
app:
image: docker.pkg.github.com/biigle/core/app
user: ${USER_ID}:${GROUP_ID}
depends_on:
- cache
build:
dockerfile: .docker/app.dockerfile
context: ./
working_dir: /var/www
volumes:
- ./:/var/www
environment:
- "DB_PORT=5432"
- "REDIS_HOST=cache"
worker:
image: docker.pkg.github.com/biigle/core/worker
user: ${USER_ID}:${GROUP_ID}
depends_on:
- app
- database_testing
build:
context: ./
dockerfile: .docker/worker.dockerfile
working_dir: /var/www
volumes:
- ./:/var/www
environment:
- "DB_PORT=5432"
- "REDIS_HOST=cache"
init: true
command: "php -d memory_limit=1G artisan queue:work --queue=high,default --sleep=5 --tries=3 --timeout=0"
# The web server
web:
image: docker.pkg.github.com/biigle/core/web
depends_on:
- app
build:
context: ./
dockerfile: .docker/web.dockerfile
working_dir: /var/www
volumes:
- ./:/var/www
ports:
- 8000:80
command: nginx -g 'daemon off;' -c /etc/nginx/nginx-no-ssl.conf
# The database
database:
image: postgres:10-alpine
volumes:
- dbdata:/var/lib/postgresql/data
- ./:/data
environment:
- "POSTGRES_DB=biigle"
- "POSTGRES_USER=biigle"
- "POSTGRES_PASSWORD=secret"
ports:
- "54320:5432"
database_testing:
image: postgres:10-alpine
tmpfs:
- /var/lib/postgresql/data
environment:
- "POSTGRES_DB=biigle"
- "POSTGRES_USER=biigle"
- "POSTGRES_PASSWORD=secret"
cache:
image: redis:3.0-alpine
volumes:
dbdata: