-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
28 lines (28 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
services:
downloader:
build: .
# HINT: We have to copy the local .bundle/config to /usr/local/bundle because the behaviour in the container is different
command: zsh -c "mkdir -p -m 0600 ~/.ssh &&
ssh-keyscan github.com >> ~/.ssh/known_hosts && eval $(ssh-agent) &&
ssh-add - <<< \"${SSH_KEY}\" &&
gem update --system --quiet --silent &&
cp ./.bundle/config /usr/local/bundle &&
bundle config set --local without 'development test lint' &&
bundle install &&
bin/rails assets:precompile &&
bin/rails s"
environment:
- RAILS_ENV=production
- RAILS_SERVE_STATIC_FILES=true
- DOWNLOADER_DB_HOST=${DOWNLOADER_DB_HOST}
- DOWNLOADER_DB_NAME=${DOWNLOADER_DB_NAME}
- DOWNLOADER_DB_USERNAME=${DOWNLOADER_DB_USERNAME}
- DOWNLOADER_DB_PASSWORD=${DOWNLOADER_DB_PASSWORD}
- DOWNLOADER_DB_PORT=${DOWNLOADER_DB_PORT}
- SECRET_KEY_BASE=${DOWNLOADER_SECRET_KEY_BASE}
ports:
- '3000:3000'
restart: always
volumes:
- ./:/repository-downloader
- ${DOWNLOADER_ATTACHMENTS_PATH}/:/repository-downloader/files