Skip to content

Commit

Permalink
Update Readme and Environment Example
Browse files Browse the repository at this point in the history
  • Loading branch information
trkyshorty committed Dec 28, 2022
1 parent f6e78d1 commit 4adbf04
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PORT=3000
JWT_SECRET=jwtsecret

# Mongoose
MONGODB_URL=mongodb://mongodb:27017/radioju-development
MONGODB_URL=mongodb://mongodb:27017/radioju
MONGODB_PORT=27017

# Redis
Expand Down
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,47 @@
## Requirements

- Docker

## Server Configuration

Start:

```bash
# run docker container in development mode
yarn docker:dev

# run docker container in production mode
yarn docker:prod
```

Backup & Restore:

```bash
# run mongodump and create backup radioju collections
docker exec -i <container-name> /usr/bin/mongodump --uri=mongodb://mongodb:27017/radioju --out /dump

# Copy to backup output folder to host root directory
docker cp <container-name>:/dump /root/dump

# Copy to backup folder to new mongodb container
docker cp /root/dump <container-name>:/dump

# Restore backup
docker exec -i <container-name> /usr/bin/mongorestore --uri=mongodb://mongodb:27017/radioju /dump/radioju
```

Linting:

```bash
# run ESLint
yarn lint

# fix ESLint errors
yarn lint:fix

# run prettier
yarn prettier

# fix prettier errors
yarn prettier:fix
```

0 comments on commit 4adbf04

Please sign in to comment.