-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_compose.production.yml
37 lines (37 loc) · 1.1 KB
/
docker_compose.production.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
services:
db:
environment:
- POSTGRES_USER=${TRACKER_DB_USERNAME}
- POSTGRES_PASSWORD=${TRACKER_DB_PASSWORD}
image: postgres:14.6-alpine3.16
restart: always
volumes:
- '${TRACKER_DB_DATA_FOLDER}:/var/lib/postgresql/data'
tracker:
build: .
command: sh -c "gem update --system &&
bundle config set --local without 'development test' &&
bundle install &&
./bin/rails db:migrate &&
./bin/rails assets:precompile &&
./bin/rails s"
environment:
- RAILS_ENV=production
- RAILS_SERVE_STATIC_FILES=true
- TRACKER_DB_HOST=db
- TRACKER_DB_USERNAME=${TRACKER_DB_USERNAME}
- TRACKER_DB_PASSWORD=${TRACKER_DB_PASSWORD}
- TRACKER_MAIL_SENDER=${TRACKER_MAIL_SENDER}
- SECRET_KEY_BASE=${TRACKER_SECRET_KEY_BASE}
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_AUTHENTICATION=${SMTP_AUTHENTICATION}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
links:
- db
ports:
- '3000:3000'
restart: always
volumes:
- ./:/repository-tracker