mirror of
https://github.com/FlipsideCrypto/badger.git
synced 2026-02-06 10:57:46 +00:00
80 lines
1.7 KiB
YAML
80 lines
1.7 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
|
|
# Deploy the contracts
|
|
badger_local_hardhat_deploy:
|
|
build:
|
|
dockerfile: Dockerfile.dev.deploy
|
|
context: ./contracts
|
|
volumes:
|
|
- .:/contracts/code
|
|
env_file:
|
|
- ./.env
|
|
restart: "no"
|
|
# Run the postgres server
|
|
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: 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
|
|
restart: always
|
|
ports:
|
|
- '3000:3000'
|
|
volumes:
|
|
- .:/frontend/code
|
|
environment:
|
|
- NODE_OPTIONS=--openssl-legacy-provider
|
|
env_file:
|
|
- ./.env
|
|
depends_on:
|
|
- web
|
|
links:
|
|
- web
|