1. Preparation
- Install the docker
- Install the docker – compose
2. Docker – compose. Yml file
version: '3'
services:
mongodb:
image: mongo:3.41.
volumes# /apps/easy-mock/data/db'/apps/easy-mock/data/db:/data/db'
networks:
- easy-mock
restart: always
redis:
image: redis:4.06.
command: redis-server --appendonly yes
volumes/apps/easy-mock/data/redis'/apps/easy-mock/data/redis:/data'
networks:
- easy-mock
restart: always
web:
image: easymock/easymock:1.6. 0NPM run dev = NPM run dev = NPM run devcommand: /bin/bash -c "npm run dev"
ports:
- 7300:7300
volumesLog address, change to local address if necessary -'/apps/easy-mock/logs:/home/easy-mock/easy-mock/logs'
networks:
- easy-mock
restart: always
networks:
easy-mock:
Copy the code
Launch Easy Mock
In the docker-comemess. yml file directory, run the following command:
docker-compose up -d
Copy the code
4. After the startup is successful, run the commanddocker ps
Check the container
5. Log in to the browserhttp://localhost:7300
6. Enter your user name and password. If they do not exist, a new user will be created
7. The preview interface displays an error reference
Query :182 Uncaught ReferenceError: HLJS is not defined