Skip to content

Commit a0d54a4

Browse files
committed
docker-compose remove deprecated links feature -> networks
1 parent 67acec7 commit a0d54a4

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

config/environments/development.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module OptimizerWrapper
5050

5151
OptimizerLogger.level = ENV['LOG_LEVEL']&.to_sym || :debug
5252
OptimizerLogger.with_datetime = true
53-
OptimizerLogger.caller_location = ENV['CALLER_LOCATION'].presence.to_sym || :relative
53+
OptimizerLogger.caller_location = ENV['CALLER_LOCATION'].presence&.to_sym || :absolute
5454

5555
@@c = {
5656
product_title: 'Optimizers API',

docker-compose.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ x-default-service: &default-service
1313
ROUTER_URL: ${ROUTER_URL:-http://localhost:8082/0.1}
1414
ROUTER_API_KEY: ${ROUTER_API_KEY:-demo}
1515
SENTRY_DSN: ${SENTRY_DSN:-}
16-
links:
17-
- redis-resque
18-
# - redis-cache
1916
volumes:
2017
- .:/srv/app
21-
- ./docker/production.rb:/srv/app/config/environments/production.rb
22-
- ./docker/production.rb:/srv/app/config/environments/development.rb
18+
depends_on:
19+
- redis-resque
2320

2421
services:
25-
api:
22+
optimizer-server:
2623
<<: *default-service
2724
ports:
2825
- "8083:80" # HOST:CONTAINER, edit only HOST part
26+
networks:
27+
- private-network
28+
- public-network
2929
command: bundle exec puma -v -p 80 --pidfile 'server.pid'
3030
restart: unless-stopped
3131

@@ -35,14 +35,25 @@ services:
3535
<<: *default-environment
3636
COUNT: 5
3737
QUEUES: DEFAULT
38+
networks:
39+
- private-network
3840
command: bundle exec rake resque:workers --trace
3941
restart: unless-stopped
4042

4143
redis-resque:
4244
image: redis:${REDIS_VERSION:-7-alpine}
45+
networks:
46+
- private-network
4347
command: redis-server --appendonly yes
4448
restart: unless-stopped
4549

50+
networks:
51+
private-network:
52+
external: false
53+
54+
public-network:
55+
name: public-network
56+
4657
# redis-cache:
4758
# image: redis:${REDIS_VERSION:-7-alpine}
4859
# command: redis-server --save ""

0 commit comments

Comments
 (0)