2022-07-03 13:47:38 +02:00
|
|
|
# Deploying Marketplace
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
2022-07-25 22:58:06 +02:00
|
|
|
* A server for hosting Ocean Marketplace. See [this guide](setup-server.md) on creating a server.
|
2022-07-03 13:47:38 +02:00
|
|
|
|
2022-07-25 20:32:13 +02:00
|
|
|
#### Create a directory
|
2022-07-03 13:47:38 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
mkdir my-marketplace
|
|
|
|
cd my-marketplace
|
|
|
|
```
|
|
|
|
|
|
|
|
### Create file with name \`.env\`
|
|
|
|
|
|
|
|
Copy the below content into the \`.env\` file.
|
|
|
|
|
|
|
|
{% code title=".env" %}
|
|
|
|
```
|
2022-07-11 16:08:46 +02:00
|
|
|
# Update this value if Market should using custom Aquarius
|
|
|
|
NEXT_PUBLIC_METADATACACHE_URI=https://v4.aquarius.oceanprotocol.com
|
|
|
|
|
|
|
|
#NEXT_PUBLIC_INFURA_PROJECT_ID="xxx"
|
|
|
|
#NEXT_PUBLIC_MARKET_FEE_ADDRESS="0xxx"
|
|
|
|
#NEXT_PUBLIC_PUBLISHER_MARKET_ORDER_FEE="1"
|
|
|
|
#NEXT_PUBLIC_CONSUME_MARKET_ORDER_FEE="1"
|
|
|
|
#NEXT_PUBLIC_CONSUME_MARKET_FIXED_SWAP_FEE="1"
|
|
|
|
|
|
|
|
#
|
|
|
|
# ADVANCED SETTINGS
|
|
|
|
#
|
|
|
|
|
|
|
|
# Toggle pricing options presented during price creation
|
|
|
|
#NEXT_PUBLIC_ALLOW_FIXED_PRICING="true"
|
|
|
|
#NEXT_PUBLIC_ALLOW_FREE_PRICING="true"
|
|
|
|
|
|
|
|
# Privacy Preference Center
|
|
|
|
#NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER="true"
|
2022-07-03 13:47:38 +02:00
|
|
|
```
|
|
|
|
{% endcode %}
|
|
|
|
|
|
|
|
#### Create a \`Dockerfile\` file and copy the below content into it.
|
|
|
|
|
|
|
|
{% code title="Dockerfile" %}
|
|
|
|
```
|
|
|
|
FROM node:16
|
|
|
|
RUN git clone https://github.com/oceanprotocol/market.git /usr/app/market
|
|
|
|
WORKDIR /usr/app/market
|
|
|
|
RUN npm ci --legacy-peer-deps
|
|
|
|
RUN npm run build
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["npx", "next", "start"]
|
|
|
|
```
|
|
|
|
{% endcode %}
|
|
|
|
|
2022-07-05 12:41:58 +02:00
|
|
|
Build a docker image
|
2022-07-03 13:47:38 +02:00
|
|
|
|
2022-07-05 12:41:58 +02:00
|
|
|
```bash
|
|
|
|
docker build . -f Dockerfile -t market:latest
|
2022-07-03 13:47:38 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Start the marketplace
|