-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
127 lines (127 loc) · 3.45 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
125
126
127
version: '3'
services:
postgrescinema:
image: postgres:13
restart: unless-stopped
container_name: cinemaDB
environment:
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
volumes:
- ./db/production:/var/lib/postgresql/data
networks:
- cinema_net
djangocinema:
restart: unless-stopped
container_name: cinemaDjango
environment:
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_HOST=postgrescinema
- POSTGRES_PORT=5432
- POSTGRES_SCHEMA=$POSTGRES_SCHEMA
- DJANGO_HOST=$DJANGO_HOST
- DJANGO_PORT=$DJANGO_PORT
- DJANGO_SECRET=$DJANGO_SECRET
build: ./cinema_admin/
command: /docker-entrypoint.sh
volumes:
- web-static:/cinema_admin/config/static
networks:
- cinema_net
depends_on:
- postgrescinema
nginxcinema:
restart: unless-stopped
container_name: cinemaNginx
environment:
- DJANGO_SERVICE_NAME=djangocinema
- DJANGO_PORT=$DJANGO_PORT
build: ./nginx/
volumes:
- web-static:/usr/share/nginx/html/static:ro
ports:
- $NGINX_HTTP_PORT:80
networks:
- cinema_net
depends_on:
- djangocinema
sqlite2pgcinema:
restart: 'no'
container_name: cinemaSqlite2PG
environment:
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_HOST=postgrescinema
- POSTGRES_PORT=5432
- POSTGRES_SCHEMA=$POSTGRES_SCHEMA
build: ./sqlite_to_postgres/
volumes:
- dump-db:/sqlite_to_postgres/db
networks:
- cinema_net
depends_on:
- postgrescinema
rediscinema:
restart: unless-stopped
container_name: cinemaRedis
environment:
- REDIS_PASSWORD=$REDIS_PASSWORD
- REDIS_PORT=$REDIS_PORT
build: ./redis/
volumes:
- ./redis/production:/data
networks:
- cinema_net
elasticcinema01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
container_name: cinemaES01
environment:
- node.name=elasticcinema01
- discovery.type=single-node
- xpack.security.enabled=true
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
volumes:
- ./elastic/production:/usr/share/elasticsearch/data
networks:
- cinema_net
pg2escinema:
restart: 'no'
container_name: pg2es
environment:
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_HOST=postgrescinema
- POSTGRES_SCHEMA=$POSTGRES_SCHEMA
- REDIS_PREFIX=$REDIS_PREFIX
- REDIS_HOST=rediscinema
- REDIS_PORT=$REDIS_PORT
- REDIS_PASSWORD=$REDIS_PASSWORD
- ELASTIC_HOST=elasticcinema01
- ELASTIC_PORT=$ELASTIC_PORT
- ELASTIC_USER=$ELASTIC_USER
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
- ELASTIC_INDEX=$ELASTIC_INDEX
- ETL_SIZE_LIMIT=$ETL_SIZE_LIMIT
build: ./postgres_to_es/
command: /docker-entrypoint.sh
networks:
- cinema_net
depends_on:
- postgrescinema
- rediscinema
- elasticcinema01
volumes:
web-static:
dump-db:
networks:
cinema_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.10.0/24