/
docker-compose.yml
92 lines (77 loc) · 2.11 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
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '3.4'
# The contents of those fields are ignored by Compose, but they can be inserted in your resource definitions
x-defaults: &defaults
restart: unless-stopped
# string containing a path to the build context
build:
# Either a path to a directory containing a Dockerfile, or a url to a git repository.
context: .
# Add build arguments, which are environment variables accessible only during the build process
args:
SENTRY_IMAGE: ${SENTRY_IMAGE}
# dependency between services
depends_on:
- redis
- postgres
- memcached
- smtp
# Declare default environment variables in file
env_file: .env
# Environment variables in Compose
environment:
SENTRY_MEMCACHED_HOST: memcached
SENTRY_REDIS_HOST: redis
SENTRY_POSTGRES_HOST: postgres
SENTRY_EMAIL_HOST: smtp
# Mount host paths or named volumes, specified as sub-options to a service.
volumes:
- sentry-data:/var/lib/sentry/files
services:
smtp:
restart: unless-stopped
# Specify the image to start the container from
image: tianon/exim4
memcached:
restart: unless-stopped
image: memcached:1.5-alpine
redis:
restart: unless-stopped
image: redis:3.2-alpine
postgres:
# restart policy
restart: unless-stopped
image: postgres:9.5
volumes:
- sentry-postgres:/var/lib/postgresql/data
web:
# t is also possible to partially override values in extension fields using the YAML merge type.
<<: *defaults
# Expose ports
# ports:
# - '9000:9000'
cron:
<<: *defaults
# Override the default command
command: run cron
worker:
<<: *defaults
# Override the default command
command: run worker
https-portal:
image: steveltn/https-portal
ports:
- '80:80'
- '443:443'
depends_on:
- web
restart: unless-stopped
environment:
DOMAINS: '${DOMAIN} -> http://web:9000'
STAGE: 'production'
# Named volume
volumes:
sentry-data:
# If set to true, specifies that this volume has been created outside of Compose
external: true
sentry-postgres:
external: true