-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (62 loc) · 1.29 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
version: '3'
services:
db:
image: postgres:14
command: postgres -c 'max_connections=250'
env_file:
- ./api/.env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
volumes:
- "dbdata:/var/lib/postgres/data"
ports:
- "${DB_PORT}:${DB_PORT}"
redis:
image: redis:latest
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
test-api:
build: ./api
platform: linux/x86_64
ports:
- "3001:3001"
depends_on:
- db
env_file:
- ./api/.env
environment:
- DATABASE_URL=${DB_TEST_URL}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASSWORD}
volumes:
- rails_log:/api/log
command: "bundle exec rspec spec"
api:
build: ./api
platform: linux/x86_64
ports:
- "${API_PORT}:${API_PORT}"
depends_on:
- db
- redis
- test-api
env_file:
- ./api/.env
environment:
- DATABASE_URL=${DB_DEV_URL}
- REDIS_URL=${REDIS_URL}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASSWORD}
volumes:
- rails_log:/api/log
frontend:
build: ./frontend
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
volumes:
- front_node_modules:/frontend/node_modules
volumes:
dbdata:
rails_log:
front_node_modules: