-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (63 loc) · 1.46 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
version: "3.7"
services:
db:
image: postgres:13
environment:
POSTGRES_DB: ${PGDATABASE-bbfh_dev}
POSTGRES_USER: bbfh
POSTGRES_PASSWORD: bbfh
# POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256 --auth-local=scram-sha-256"
volumes:
- db-data:/var/lib/postgresql/data
dev:
build:
context: .
target: dev-environment
depends_on:
- db
entrypoint: scripts/entrypoint
environment:
RAILS_ENV: development
DATABASE_HOST: db
volumes:
- ./:/work
- ruby-2.7.6-dev-gem-cache:/usr/local/bundle
ports:
- 3000:3000
backup:
build:
context: .
dockerfile: Dockerfile-backup
depends_on:
- db
volumes:
- ./scripts/backup:/work/scripts/backup
- ./scripts/restore:/work/scripts/restore
environment:
AWS_ACCESS_KEY_ID: ~
AWS_DEFAULT_REGION: ~
AWS_SECRET_ACCESS_KEY: ~
S3_BACKUP_BUCKET: ~
PGHOST: db
PGUSER: bbfh
PGPASSWORD: bbfh
PGDATABASE: ~
prod:
image: bbfh_prod:latest
depends_on:
- db
command: ['bash', '-c', 'scripts/migrate && scripts/start']
environment:
RAILS_ENV: production
RAILS_SERVE_STATIC_FILES: "true"
DATABASE_HOST: db
volumes:
- ./scripts/migrate:/work/scripts/migrate
- ./scripts/start:/work/scripts/start
networks:
default:
aliases:
- bbfh
volumes:
db-data: ~
ruby-2.7.6-dev-gem-cache: ~