Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module OptimizerWrapper

OptimizerLogger.level = ENV['LOG_LEVEL']&.to_sym || :debug
OptimizerLogger.with_datetime = true
OptimizerLogger.caller_location = ENV['CALLER_LOCATION'].presence.to_sym || :relative
OptimizerLogger.caller_location = ENV['CALLER_LOCATION'].presence&.to_sym || :absolute

@@c = {
product_title: 'Optimizers API',
Expand Down
18 changes: 15 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ x-default-service: &default-service
# - redis-cache
volumes:
- .:/srv/app
- ./docker/production.rb:/srv/app/config/environments/production.rb
- ./docker/production.rb:/srv/app/config/environments/development.rb

services:
api:
optimizer-server:
<<: *default-service
ports:
- "8083:80" # HOST:CONTAINER, edit only HOST part
networks:
- private-network
- public-network
command: bundle exec puma -v -p 80 --pidfile 'server.pid'
restart: unless-stopped

Expand All @@ -35,14 +36,25 @@ services:
<<: *default-environment
COUNT: 5
QUEUES: DEFAULT
networks:
- private-network
command: bundle exec rake resque:workers --trace
restart: unless-stopped

redis-resque:
image: redis:${REDIS_VERSION:-7-alpine}
networks:
- private-network
command: redis-server --appendonly yes
restart: unless-stopped

networks:
private-network:
external: false

public-network:
name: public-network

# redis-cache:
# image: redis:${REDIS_VERSION:-7-alpine}
# command: redis-server --save ""