-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (67 loc) · 1.81 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
72
73
version: '3.4'
services:
db:
image: postgres:14.2-alpine
container_name: fn-postgres
volumes:
- db:/var/lib/postgresql/data
command:
"postgres -c 'max_connections=500'"
ports:
- 5432:5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ruby:
build: .
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_URL=${REDIS_URL}
- CHROME_URL=http://chrome:3333
container_name: fn-ruby
working_dir: /rails
restart: always
tty: true
volumes:
- .:/rails
- app-storage:/rails/storage
ports:
- "3000:3000"
chrome:
# Currently, Apple M1 is only supported in unnumbered "latest" versions.
# See https://github.com/browserless/chrome/issues/1393
image: browserless/chrome:latest
container_name: fn-chrome
ports:
- 3333:3333
# Mount application source code to support file uploading
# (otherwise Chrome won't be able to find files).
# NOTE: Make sure you use absolute paths in `#attach_file`.
volumes:
- .:/app:cached # change it for your rails' container directory
environment:
# By default, it uses 3000, which is typically used by Rails.
PORT: 3333
# Set connection timeout to avoid timeout exception during debugging
# https://docs.browserless.io/docs/docker.html#connection-timeout
CONNECTION_TIMEOUT: 600000
redis:
image: redis:alpine3.8
container_name: fn-redis
mem_limit: 256m
volumes:
- redis-data:/var/lib/redis/data
ports:
- "6379:6379"
restart: on-failure
logging:
driver: none
volumes:
db: {}
redis-data: {}
app-storage: {}
networks:
default:
name: financial