Skip to content

Commit

Permalink
docker-compose remove deprecated links feature -> networks
Browse files Browse the repository at this point in the history
  • Loading branch information
braktar committed Feb 27, 2024
1 parent 9cd9b42 commit 86f0244
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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
23 changes: 17 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ x-default-service: &default-service
ROUTER_URL: ${ROUTER_URL:-http://localhost:8082/0.1}
ROUTER_API_KEY: ${ROUTER_API_KEY:-demo}
SENTRY_DSN: ${SENTRY_DSN:-}
links:
- redis-resque
# - redis-cache
volumes:
- .:/srv/app
- ./docker/production.rb:/srv/app/config/environments/production.rb
- ./docker/production.rb:/srv/app/config/environments/development.rb
depends_on:
- redis-resque

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 +35,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 ""

0 comments on commit 86f0244

Please sign in to comment.