Update the docker-compose.yml file to use the dawarich network

This commit is contained in:
Eugene Burmakin 2024-03-15 23:45:48 +01:00
parent 8e52eb7085
commit bb1f82076a
3 changed files with 8 additions and 10 deletions

View file

@ -1,6 +1,8 @@
class PointsController < ApplicationController
before_action :authenticate_user!
def index
@points = Point.all
@points = current_user.points
@coordinates = @points.as_json(only: [:latitude, :longitude])
end

View file

@ -8,7 +8,7 @@ echo "Environment: $RAILS_ENV"
rm -f $APP_PATH/tmp/pids/server.pid
# Wait for the database to be ready
until nc -zv wardu_db 5432; do
until nc -zv $DATABASE_HOST 5432; do
echo "Waiting for PostgreSQL to be ready..."
sleep 1
done

View file

@ -1,16 +1,14 @@
version: '3'
networks:
development:
dawarich:
services:
dawarich_redis:
image: redis:7.0-alpine
command: redis-server
networks:
- development
- dawarich
volumes:
- shared_data:/var/shared/redis
ports:
- 6379:6379
dawarich_db:
image: postgres:14.2-alpine
container_name: dawarich_db
@ -18,19 +16,17 @@ services:
- db_data:/var/lib/postgresql/data
- shared_data:/var/shared
networks:
- development
- dawarich
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5099:5432
dawarich_app:
image: registry.chibi.rodeo/dawarich:latest
container_name: dawarich_app
volumes:
- gem_cache:/usr/local/bundle/gems
networks:
- development
- dawarich
ports:
- 3000:3000
stdin_open: true