66 lines
1.2 KiB
Markdown
66 lines
1.2 KiB
Markdown
# NullCart
|
|
|
|
Self-hosted Monero shop with clearnet (HTTPS) and Tor onion hosting.
|
|
|
|
For production deployment, see the [deployment guide](deploy/DEPLOYMENT_GUIDE.md).
|
|
|
|
## Development
|
|
|
|
### Start dev environment
|
|
|
|
```bash
|
|
# Create and edit .env.dev as needed
|
|
cp .env.example .env.dev
|
|
|
|
# Create monero wallet used by shop
|
|
./monero-wallet-rpc/setup-monero-wallet.sh --env-file .env.dev
|
|
|
|
# Build and start docker containers
|
|
docker compose --env-file .env.dev -f docker-compose.dev.yml build --no-cache
|
|
docker compose --env-file .env.dev -f docker-compose.dev.yml up --force-recreate
|
|
```
|
|
|
|
### Install npm packages for code editor visibility
|
|
|
|
```bash
|
|
cd backend && npm i && cd ../cms && npm i
|
|
```
|
|
|
|
### Database operations (run from inside container)
|
|
|
|
```bash
|
|
docker exec -it <container_name> /bin/sh
|
|
```
|
|
|
|
#### Running the migration
|
|
|
|
```bash
|
|
npm run typeorm:run-migrations
|
|
```
|
|
|
|
#### Generating the migration
|
|
|
|
```bash
|
|
npm run typeorm:generate-migration --name=<migration_name>
|
|
```
|
|
|
|
#### Reverting the last migration
|
|
|
|
```bash
|
|
npm run typeorm:revert-migration
|
|
```
|
|
|
|
#### Seeders
|
|
|
|
```bash
|
|
npm run typeorm:create-migration --name=<migration_name>
|
|
```
|
|
|
|
## Tests
|
|
|
|
### Backend unit tests
|
|
|
|
```bash
|
|
cd backend && npm run test
|
|
```
|