-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml.example
85 lines (69 loc) · 1.6 KB
/
docker-compose.yml.example
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
74
75
76
77
78
79
80
81
82
83
84
85
version: '2.1'
services:
app:
build:
context: .
args:
BUILD_ENV: development # defaults to `production`
depends_on:
db:
condition: service_healthy
restart: unless-stopped
volumes:
# for local development only
# public/uploads should be volumized in production
- .:/opt/trainers-hub
- /opt/trainers-hub/node_modules
env_file: .env
db:
image: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 30s
timeout: 30s
retries: 3
env_file: .env
volumes:
- ./pgdata:/var/lib/postgresql/data
redis:
image: redis
nginx:
build:
context: ./nginx
depends_on:
- app
ports:
- '3000:3000'
volumes:
- ./nginx/sec.conf:/etc/nginx/sites-enabled/sec.conf
- ./public:/var/www/html
- ./files:/var/www/files
# Cron service for production
# cron:
# build: .
# depends_on:
# db:
# condition: service_healthy
# user: root
# restart: always
# command: /bin/sh -c 'env >> /etc/environment && crond -f'
# entrypoint: ""
# env_file: .env
# DelayedJob worker for production
# worker:
# build: .
# depends_on:
# db:
# condition: service_healthy
#
# restart: unless-stopped
#
# env_file: .env
#
# command: bundle exec rake jobs:work
# Chrome browser for production
# chrome:
# image: justinribeiro/chrome-headless:latest
# command: --headless --disable-gpu --no-sandbox \
# --remote-debugging-address=0.0.0.0 \
# --remote-debugging-port=9222