mirror of
https://github.com/AtHeartEngineering/bandada.git
synced 2026-01-09 22:27:57 -05:00
chore: add postgres integration
This commit is contained in:
@@ -1,52 +1,86 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
api:
|
||||
container_name: api
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./apps/api/Dockerfile
|
||||
image: ${DOMAIN}-api:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DB_NAME="/home/node/api/zk-groups.db"
|
||||
volumes:
|
||||
- sqlite:/home/node/api/zk-groups.db
|
||||
ports:
|
||||
- "3333:3333"
|
||||
networks:
|
||||
- zk-groups
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
environment:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: helloworld
|
||||
POSTGRES_DB: zk-groups
|
||||
PGDATA: /data/postgres
|
||||
volumes:
|
||||
- postgres:/data/postgres
|
||||
- ./database/seed.sql:/docker-entrypoint-initdb.d/seed.sql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
restart: unless-stopped
|
||||
command: postgres -c listen_addresses='*'
|
||||
networks:
|
||||
- zk-groups
|
||||
|
||||
client:
|
||||
container_name: client
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./apps/client/Dockerfile
|
||||
image: ${DOMAIN}-client:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "3002:80"
|
||||
networks:
|
||||
- zk-groups
|
||||
api:
|
||||
container_name: api
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./apps/api/Dockerfile
|
||||
image: ${DOMAIN}-api:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DB_TYPE=postgres
|
||||
- DB_URL=postgres://root:helloworld@postgres:5432/zk-groups
|
||||
- JWT_SECRET_KEY=zk_groups_jwt_secret
|
||||
- SESSION_SECRET=keyboard cat
|
||||
- GITHUB_CLIENT_ID=sample
|
||||
- GITHUB_CLIENT_SECRET=sample
|
||||
- TWITTER_CONSUMER_KEY=sample
|
||||
- TWITTER_CONSUMER_SECRET=sample
|
||||
- REDDIT_CLIENT_ID=sample
|
||||
- REDDIT_CLIENT_SECRET=sample
|
||||
- BACKEND_PRIVATE_KEY=
|
||||
- INFURA_API_KEY=
|
||||
- COINMARKETCAP_API_KEY=
|
||||
- ETHERSCAN_API_KEY=
|
||||
- ZKGROUPS_GOERLI_ADDRESS=
|
||||
ports:
|
||||
- "3000:3333"
|
||||
networks:
|
||||
- zk-groups
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
dashboard:
|
||||
container_name: dashboard
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./apps/dashboard/Dockerfile
|
||||
image: ${DOMAIN}-dashboard:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "3001:80"
|
||||
networks:
|
||||
- zk-groups
|
||||
client:
|
||||
container_name: client
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./apps/client/Dockerfile
|
||||
image: ${DOMAIN}-client:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "3002:80"
|
||||
networks:
|
||||
- zk-groups
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
dashboard:
|
||||
container_name: dashboard
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./apps/dashboard/Dockerfile
|
||||
image: ${DOMAIN}-dashboard:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "3001:80"
|
||||
networks:
|
||||
- zk-groups
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
networks:
|
||||
zk-groups:
|
||||
@@ -54,4 +88,4 @@ networks:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
sqlite:
|
||||
postgres:
|
||||
|
||||
Reference in New Issue
Block a user