mirror of
https://github.com/FlipsideCrypto/badger.git
synced 2026-02-06 10:57:46 +00:00
81 lines
2.0 KiB
YAML
81 lines
2.0 KiB
YAML
version: '3.8'
|
|
services:
|
|
# Run the hardhat node
|
|
badger_local_hardhat_node:
|
|
build:
|
|
dockerfile: Dockerfile.dev.node
|
|
context: ./contracts
|
|
volumes:
|
|
- .:/contracts/code
|
|
env_file:
|
|
- ./.env
|
|
ports:
|
|
- "8545:8545"
|
|
restart: unless-stopped
|
|
command: npx hardhat run scripts/deploy/deploy.js
|
|
badger_db:
|
|
image: postgres:13.2
|
|
container_name: badger_db
|
|
restart: always
|
|
environment:
|
|
POSTGRES_PASSWORD: badger
|
|
POSTGRES_USER: badger
|
|
POSTGRES_DB: badger
|
|
volumes:
|
|
- ./api/database:/var/lib/postgresql/data
|
|
hostname: badger_db
|
|
ports:
|
|
- '5432:5432'
|
|
# Run the badger server
|
|
web:
|
|
container_name: badger_server
|
|
build:
|
|
dockerfile: Dockerfile.dev
|
|
context: ./api
|
|
command: >
|
|
sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
|
|
restart: always
|
|
ports:
|
|
- '8000:8000'
|
|
env_file:
|
|
- ./.env
|
|
volumes:
|
|
- ./api:/code
|
|
depends_on:
|
|
- badger_db
|
|
links:
|
|
- badger_db
|
|
# Run the React frontend
|
|
frontend:
|
|
container_name: badger_frontend
|
|
build:
|
|
dockerfile: Dockerfile.dev
|
|
context: ./frontend
|
|
args:
|
|
# use FONTAWSOME_TOKEN in .env to get access to private fontawesome packages
|
|
FONTAWESOME_NPM_AUTH_TOKEN: ${FONTAWESOME_NPM_AUTH_TOKEN}
|
|
command: npm start --host 0.0.0.0 --disableHostCheck true
|
|
restart: always
|
|
ports:
|
|
- '3000:3000'
|
|
# make sure the volumes for hot reloading to work are setup
|
|
volumes:
|
|
- ./frontend:/code
|
|
- /code/node_modules
|
|
- /code/public
|
|
environment:
|
|
- NODE_OPTIONS=--openssl-legacy-provider
|
|
# ENABLE this to use the local backend
|
|
- REACT_APP_BACKEND_URL=http://localhost:8000
|
|
# Enable this for hot reloads
|
|
- CHOKIDAR_USEPOLLING=true
|
|
- WATCHPACK_POLLING=true
|
|
- WDS_SOCKET_HOST=127.0.0.1
|
|
- NODE_ENV=development
|
|
env_file:
|
|
- ./.env
|
|
depends_on:
|
|
- web
|
|
links:
|
|
- web
|