-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
53 lines (48 loc) · 1.1 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
version: '2'
services:
server:
image: getpix/pix
build:
context: .
environment:
NODE_ENV: production
MONGO_URI: mongodb://mongo:27017/pix
REDIS_HOST: redis
REDIS_PORT: 6379
DATA_PATH: /mnt/data # used for storing thumbnails and some state files
PIX_URL: http://localhost:8080 # used for generating image urls
volumes:
- "pix_data:/mnt/data"
# Add volume mount for your photo directory
ports:
- "8080:80"
command: server
worker:
image: getpix/pix
build:
context: .
environment:
NODE_ENV: production
MONGO_URI: mongodb://mongo:27017/pix
REDIS_HOST: redis
REDIS_PORT: 6379
DATA_PATH: /mnt/data
PIX_URL: http://localhost:8080 # used for generating image urls
volumes:
- "pix_data:/mnt/data"
# Add volume mount for your photo directory
command: worker
mongo:
image: mongo
ports:
- "27017"
volumes:
- "mongo_data:/data/db"
command: mongod --smallfiles
redis:
image: redis
ports:
- "6379"
volumes:
mongo_data:
pix_data: