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 class PointsController < ApplicationController
before_action :authenticate_user!
def index def index
@points = Point.all @points = current_user.points
@coordinates = @points.as_json(only: [:latitude, :longitude]) @coordinates = @points.as_json(only: [:latitude, :longitude])
end end

View file

@ -8,7 +8,7 @@ echo "Environment: $RAILS_ENV"
rm -f $APP_PATH/tmp/pids/server.pid rm -f $APP_PATH/tmp/pids/server.pid
# Wait for the database to be ready # 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..." echo "Waiting for PostgreSQL to be ready..."
sleep 1 sleep 1
done done

View file

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