-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: setup prod and dev docker with compose
ref #229
- Loading branch information
1 parent
f23e3b8
commit fb0cf85
Showing
19 changed files
with
291 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
services: | ||
api: | ||
build: | ||
dockerfile: docker/Dockerfile.api | ||
target: production | ||
|
||
indexer: | ||
build: | ||
dockerfile: docker/Dockerfile.indexer | ||
target: production | ||
|
||
provider-proxy: | ||
build: | ||
dockerfile: docker/Dockerfile.provider-proxy | ||
|
||
deploy-web: | ||
build: | ||
dockerfile: docker/Dockerfile.deploy-web | ||
target: production | ||
|
||
stats-web: | ||
build: | ||
dockerfile: docker/Dockerfile.stats-web | ||
|
||
landing: | ||
build: | ||
dockerfile: docker/Dockerfile.landing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
services: | ||
api: | ||
restart: always | ||
environment: | ||
AkashSandboxDatabaseCS: postgres://postgres:password@db:5432/cloudmos-akash-sandbox | ||
UserDatabaseCS: postgres://postgres:password@db:5432/cloudmos-users | ||
env_file: | ||
- apps/api/.env.local | ||
ports: | ||
- '3080:3080' | ||
depends_on: | ||
- db | ||
|
||
indexer: | ||
restart: always | ||
environment: | ||
AkashSandboxDatabaseCS: postgres://postgres:password@db:5432/cloudmos-akash-sandbox | ||
UserDatabaseCS: postgres://postgres:password@db:5432/cloudmos-users | ||
env_file: | ||
- apps/indexer/.env.local | ||
depends_on: | ||
- db | ||
|
||
provider-proxy: | ||
restart: always | ||
ports: | ||
- '3040:3040' | ||
|
||
deploy-web: | ||
restart: always | ||
environment: | ||
API_BASE_URL: http://api:3080 | ||
PROVIDER_PROXY_URL: http://provider-proxy:3040 | ||
env_file: | ||
- apps/deploy-web/.env.local | ||
ports: | ||
- '3000:3000' | ||
depends_on: | ||
- api | ||
- provider-proxy | ||
|
||
stats-web: | ||
restart: always | ||
environment: | ||
API_MAINNET_BASE_URL: http://api:3080 | ||
API_TESTNET_BASE_URL: http://api:3080 | ||
API_SANDBOX_BASE_URL: http://api:3080 | ||
API_BASE_URL: http://api:3080 | ||
ports: | ||
- '3001:3000' | ||
depends_on: | ||
- api | ||
|
||
landing: | ||
restart: always | ||
ports: | ||
- '3002:3000' | ||
|
||
db: | ||
build: | ||
context: docker | ||
dockerfile: Dockerfile.db | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DBS_FOR_IMPORT: cloudmos-akash-sandbox | ||
POSTGRES_USERS_DB: cloudmos-users | ||
restart: always | ||
ports: | ||
- '5432:5432' | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
|
||
volumes: | ||
postgres_data: | ||
driver: local |
Oops, something went wrong.
I would suggest doing a "Quick Start" section that just calls out what's needed for someone to run it locally. Something like
Running it locally
clone the repo locally and then run:
npm run dc:up:dev -- deploy-web
This run the app locally, including spinning up all dependencies like the API. To run locally with a copy of the production DB, see the detailed set up section below