docker-compose.yml
version: '2.4'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
postgres:
image: postgres:14.2
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
expose:
- '5432'
redis:
image: redis:6.2
expose:
- "6379"
volumes:
- redis:/data
web:
build: .
environment:
MAIN_HOST: "localhost:3000"
DB_USERNAME: 'postgres'
DB_PASSWORD: 'postgres'
DB_HOST: 'postgres'
REDISCLOUD_URL: 'redis://redis:6379'
VIRTUAL_HOST: 'cm42-central.localhost'
VIRTUAL_PORT: 3000
MEMCACHIER_SERVERS: memcached:11211
depends_on:
- postgres
- redis
ports:
- 3000
volumes:
- .:/app
- ./node_modules:/app/node_modules
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
worker:
build: .
environment:
DB_USERNAME: 'postgres'
DB_PASSWORD: 'postgres'
DB_HOST: 'postgres'
REDISCLOUD_URL: 'redis://redis:6379/0'
MEMCACHIER_SERVERS: memcached:11211
depends_on:
- postgres
- redis
volumes:
- .:/app
command: sidekiq
vite:
build: .
ports:
- "3036:3036"
volumes:
- .:/app
- ./node_modules:/app/node_modules
command: sh -c "bundle binstubs bundler --force && ruby ./bin/vite dev"
pusherfake:
build: .
ports:
- "8888:8888" # Pusher-Fake web port
- "45449:45449" # Pusher-Fake socket port
volumes:
- .:/app
environment:
PUSHER_APP_ID: 1234
PUSHER_WS_PORT: 45449
PUSHER_PORT: 8888
PUSHER_APP_KEY: 123456
PUSHER_APP_SECRET: 34214341
adminer:
image: adminer:4.8.1
environment:
- VIRTUAL_HOST=adminer.cm42-central.localhost
memcached:
image: memcached
volumes:
db:
redis:
node_modules: