docker-compose.yml
version: "3.9"
services:
db:
image: postgres
volumes:
- ./backend/tmp/db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
networks:
hunt3r_network:
aliases:
- db
logging:
options:
max-file: "1"
max-size: "5m"
backend:
build: ./backend
command: bash -c "sed -i 's;YOUR_JWT_SUPER_SECRET;'$$(openssl rand -base64 32)';' ./lib/json_web_token.rb && rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- ./backend:/hunt3r
networks:
hunt3r_network:
aliases:
- backend.local
logging:
options:
max-file: "1"
max-size: "2m"
depends_on:
- db
frontend:
build: ./frontend
networks:
hunt3r_network:
aliases:
- frontend.local
logging:
options:
max-file: "1"
max-size: "2m"
proxy_hunt3r:
restart: always
image: nginx:alpine
ports:
- "80:80"
depends_on:
- frontend
- backend
networks:
hunt3r_network:
volumes:
- ./conf/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
networks:
hunt3r_network:
volumes:
db: