generated from dxw/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (50 loc) · 1.08 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.8"
services:
app:
# $ docker compose -p ghbs up app
# $ docker exec -it ghbs_prod /bin/bash
#
tmpfs:
- /tmp
container_name: ghbs_prod
build:
context: .
target: app
image: ghbs:prod
command: bundle exec rails server -b 'ssl://0.0.0.0:3000?key=localhost.key&cert=localhost.crt'
environment:
SECRET_KEY_BASE: secret
RAILS_ENV: production
REDIS_URL: redis://cache:6379
# SUPPORT_EMAIL: [email protected]
# RAILS_SERVE_STATIC_FILES: "true"
# ports:
# - 3000:3000
volumes:
- .:/srv/app
# - ./localhost.key:/srv/app/localhost.key
# - ./localhost.crt:/srv/app/localhost.crt
depends_on:
- db
- cache
tty: true
stdin_open: true
networks:
- ghbs
db:
container_name: ghbs_db
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: trust
networks:
- ghbs
cache:
container_name: ghbs_cache
image: redis
networks:
- ghbs
networks:
ghbs: