-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
54 lines (53 loc) · 1.18 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
version: "3.7"
services:
api:
build: .
networks:
- exercises
ports:
- "3000:3000"
command: bash -c "bin/rake about && bin/rails server -b '0.0.0.0' -p 3000"
environment:
- OXE_DEV_DB_HOST=postgres
- OXE_TEST_DB_HOST=postgres_test
- OXE_DB_USER=ox_exercises
- OXE_DB_PASS=ox_exercises
- OXE_DEV_DB=ox_exercises_dev
- OXE_TEST_DB=ox_exercises_test
- REDIS_URL=redis://redis:6379/0
volumes:
- .:/code
- /code/tmp
- /code/log
postgres:
image: "postgres:9.5"
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- exercises
environment:
- POSTGRES_USER=ox_exercises
- POSTGRES_PASSWORD=ox_exercises
- POSTGRES_DB=ox_exercises_dev
postgres_test:
image: "postgres:9.5"
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- exercises
environment:
- POSTGRES_USER=ox_exercises
- POSTGRES_PASSWORD=ox_exercises
- POSTGRES_DB=ox_exercises_test
redis:
image: "redis:alpine"
command: redis-server
volumes:
- 'redis:/data'
networks:
- exercises
networks:
exercises:
volumes:
pgdata:
redis: