-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
59 lines (53 loc) · 1.58 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
version: '3'
services:
app:
build: .
image: advent-app:latest
container_name: advent-app
ports:
- "3000:3000"
environment:
DB_HOST : ${DB_HOST}
DB_PORT : ${DB_PORT}
DB_USER : ${DB_USER}
DB_PASS : ${DB_PASS}
SECRET_KEY_BASE : ${SECRET_KEY_BASE}
FORTYTWO_KEY : ${FORTYTWO_KEY}
FORTYTWO_SECRET : ${FORTYTWO_SECRET}
SENTRY_DSN : ${SENTRY_DSN}
AOC_LEADERBOARD_ID : ${AOC_LEADERBOARD_ID}
AOC_LEADERBOARD_JOIN_TOKEN : ${AOC_LEADERBOARD_JOIN_TOKEN}
AOC_LOGIN_TOKEN : ${AOC_LOGIN_TOKEN}
env_file:
- ".env"
depends_on:
- db
db:
image: postgres:15
container_name: advent-db
volumes:
- postgres_data:/var/lib/postgresql/data
command: "postgres -c 'max_connections=500'"
environment:
POSTGRES_DB : advent
POSTGRES_USER : ${DB_USER}
POSTGRES_PASSWORD : ${DB_PASS}
test:
profiles:
- test
build: .
image: advent-test:latest
container_name: advent-test
command: "bin/bundle exec rspec"
environment:
RAILS_ENV : test
TERM : xterm-256color
DB_HOST : ${DB_HOST}
DB_PORT : ${DB_PORT}
DB_USER : ${DB_USER}
DB_PASS : ${DB_PASS}
SECRET_KEY_BASE : ${SECRET_KEY_BASE}
depends_on:
- db
volumes:
postgres_data: {}