-
Notifications
You must be signed in to change notification settings - Fork 288
/
docker-compose.yml
124 lines (112 loc) · 2.96 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# docker-compose for Pootle development.
#
# Note: Requires docker-compose 1.10+.
version: "2.4"
services:
base:
build:
context: ./docker
base-postgres:
extends: base
image: translate/pootle:base-postgres
build:
args:
- BUILD_IMAGE=demo
- APP_DB_ENV=postgres
- BUILD_INSTALL_PKGS=libpq-dev
- BUILD_INSTALL_EGGS=psycopg2-binary
- BUILD_INSTALL_SETTINGS=./settings.postgres.conf
- BASE_INSTALL_PRE=mkdir -p /usr/share/man/man1 /usr/share/man/man7
- BASE_INSTALL_PKGS=postgresql-client
base-production:
extends: base-postgres
build:
args:
- APP_PKG=Pootle
- BUILD_IMAGE=production
- BUILD_INSTALL_EGGS=psycopg2-binary uwsgi
- BASE_INSTALL_PKGS=postgresql-client libpython2.7
command: ["/app/src/pootle/docker/bin/run_in_container", "bash", "uwsgi", "--ini", "/app/wsgi/pootle-uwsgi.ini"]
volumes:
- production-assets:/app/lib/python2.7/site-packages/pootle/assets
- production-run:/var/run/pootle
- production-logs:/app/log
# Postgres based production image
production:
image: translate/pootle:production
extends: base-production
depends_on:
- postgres
- redis
- elasticsearch
# Postgres based production image using current pre-release
production-pre:
image: translate/pootle:production-pre
extends: base-production
build:
args:
- APP_PKG=Pootle --pre
depends_on:
- postgres
- redis
- elasticsearch
## Other services
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3
restart: always
ports:
- 9200:9200
environment:
- cluster.name=docker-cluster
- transport.host=127.0.0.1
- transport.tcp.port=9300
- http.port=9200
- network.host=0.0.0.0
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
postgres:
image: postgres:9.4-alpine
restart: always
environment:
- POSTGRES_USER=pootle
- POSTGRES_PASSWORD=CHANGEME
- POSTGRES_DB=pootledb
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:alpine
restart: always
volumes:
- redis-data:/data
web:
image: translate/pootle:web-nginx
build:
context: ./docker/nginx
depends_on:
- "${POOTLE_PRODUCTION_IMAGE:-production}"
ports:
- "80:80"
- "443:443"
command: /usr/local/bin/start_nginx
restart: always
volumes:
- production-ssl:/etc/letsencrypt
- production-assets:/var/www/assets
- production-run:/var/run/pootle
- web-logs:/var/log/nginx/pootle
environment:
- POOTLE_SERVER_NAME=${POOTLE_SERVER_NAME:-localhost}
certbot:
image: certbot/certbot
volumes:
- production-ssl:/etc/letsencrypt
volumes:
postgres-data:
redis-data:
production-assets:
production-run:
production-logs:
production-ssl:
web-logs:
postgres-data:
redis-data: