-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
55 lines (50 loc) · 1.08 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
version: '2'
services:
web:
build: .
volumes:
- ./:/app
external_links:
- mysqldb
links:
- redisdb
restart: always
ports:
- "8081:80"
environment:
- "REDISTOGO_URL=redis://redisdb:6379"
- "VIRTUAL_HOST=stalker.zense.co.in"
cpu_shares: 30
mem_limit: 512m
networks:
- production
- default
worker:
build: .
volumes:
- ./:/app
external_links:
- mysqldb
links:
- redisdb
restart: always
environment:
- "REDISTOGO_URL=redis://redisdb:6379"
command: python worker.py
cpu_shares: 30
mem_limit: 512m
networks:
- production
- default
redisdb:
image: redis
networks:
- default
networks:
production:
external: true
# We are using an external link for mysql because we already have a mysql running for us in producton env
# For local development environmnt you have to run a mysql container separately to make this work
# Example:
# docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=thanks123 -d mysql
# docker-compose up