cuixueshe / earthworm
- понедельник, 11 марта 2024 г. в 00:00:07
Learning English through the method of constructing sentences with conjunctions
By constructing sentences with conjunctions, it helps you learn English better~ 😊
docker --version # Docker version 24.0.7, build afdd53b
node --version # v20+
pnpm -v # 8+pnpm installIf the file doesn't exist, you need to create it manually. Linux users can perform the operation with the following command.
It primarily stores environmental variable information for the main storage system, such as database connection addresses, usernames, passwords, ports, keys, and so on. The backend service will read configuration from this file. Of course, you can also customize it with your own configuration information.
cp .env.example ./apps/api/.envThe backend relies on MySQL and Redis services. Start and stop these services using the commands configured in package.json below.
# start
pnpm docker:start
# stop
pnpm docker:stop
# delete
pnpm docker:deleteIf you prefer manual, you can use the commands below.
docker compose up -d
docker compose stop
docker compose down
# commands compatible with older versions of Docker
docker-compose up -dWhen executing the current command, try to wait for a short interval after the previous command, as we are using the -d parameter, which runs the services in the background. They might still be in a 'running' state. If you encounter an error, try running the command again.
pnpm db:initpnpm db:uploadpnpm dev:servepnpm dev:clientwhen you identify incorrect course data and make modifications, you should use the following command to update the course data in the database.
pnpm db:updateSome dependencies require compilation during installation, necessitating the presence of relevant build environments. If these environments are not available, the compilation process may fail. Additionally, different modules may require different build environments, so specific issues need to be analyzed individually. Below are specific problems encountered along with their solutions.
First try the following command to update pnpm
pnpm i -g
# or
pnpm i -g pnpm
# or
npx pnpm i -g pnpm@latestError installing the argon2 module on Windows
chcp 437 in the command prompt, then rerun the install command.When using WSL2 as a development environment in Windows, the following error occurs when starting Docker with docker compose up -d :
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission deniedSolution
Add the current user to the docker group
# Add docker user group
sudo groupadd docker
# Add the logged-in user to the docker user group
sudo gpasswd -a $USER docker
# Update user group
newgrp docker
# Test if docker command is working properly
docker imagesstorestoreToRefs is also quite cumbersomeuseMessageThanks to everyone who has already contributed to Earthworm! 🎉