-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
53 lines (53 loc) · 1.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
version: '3'
services:
db:
image: mongo:3.4.5
command: mongod --smallfiles --quiet --logpath=/dev/null --dbpath=/data/db
volumes:
- ./mongo_data:/data/db
redis:
image: redis:3.2.9
command: redis-server
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
ports:
- "6379:6379"
frontend:
build:
context: .
dockerfile: Dockerfile
environment:
DOCKER: "true"
volumes:
- .:/var/www/app/:rw
- /var/www/app/node_modules
ports:
- "8080:8080"
restart: always
links:
- backend
test:
image: mhart/alpine-node:8.0.0
working_dir: /var/www/app
volumes:
- .:/var/www/app
environment:
NODE_ENV: testing
command:
/bin/sh -c "./node_modules/.bin/ava test/component/*.js test/unit/*.js"
backend:
build:
context: .
dockerfile: Dockerfile-go
command: go run main.go data.go
volumes:
- .:/var/www/app/:rw
ports:
- "3001:8081"
environment:
MONGO_URL: "db"
REDIS_URL: "redis:6379"
restart: always
links:
- db
- redis