Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
enijar committed Nov 16, 2024
1 parent 909b913 commit 848f54f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 74 deletions.
45 changes: 5 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,11 @@ npm --prefix server run update-movies
### Production

```shell
##################################
# Build and run client container #
##################################
DOCKER_BUILDKIT=1 docker build client \
--rm \
-f client/Dockerfile \
-t torrent-streaming/client \
--build-arg NODE_ENV=production \
--build-arg PORT=8080 \
--build-arg API_URL=http://localhost:3000

docker run --rm -p 8080:8080 torrent-streaming/client
cp client/.env.example client/.env
cp server/.env.example server/.env

##################################
# Build and run server container #
##################################
DOCKER_BUILDKIT=1 docker build server \
--rm \
-f server/Dockerfile \
-t torrent-streaming/server \
--build-arg NODE_ENV=production \
--build-arg PORT=3000 \
--build-arg API_URL=http://localhost:3000 \
--build-arg APP_URL=http://localhost:8080 \
--build-arg CORS_ORIGINS=http://localhost:3000,http://localhost:8080 \
--build-arg BCRYPT_ROUNDS=12 \
--build-arg DATABASE_HOST=127.0.0.1 \
--build-arg DATABASE_NAME=torrent-streaming \
--build-arg DATABASE_DIALECT=sqlite \
--build-arg DATABASE_USERNAME=torrent-streaming \
--build-arg DATABASE_PASSWORD=secret \
--build-arg DATABASE_STORAGE=.cache/database.sqlite \
--build-arg JWT_SECRET=secret \
--build-arg EMAIL_PREVIEW=true \
--build-arg EMAIL_SEND=false \
--build-arg [email protected] \
--build-arg EMAIL_SMTP_HOST=smtp.sendgrid.net \
--build-arg EMAIL_SMTP_PORT=587 \
--build-arg EMAIL_SMTP_USERNAME=apikey \
--build-arg EMAIL_SMTP_PASSWORD=secret
npm install
npm run build

docker run --rm -p 3000:3000 torrent-streaming/server
pm2 start --name server /var/www/torrent-streaming/server/build/index.js
```
5 changes: 0 additions & 5 deletions client/.dockerignore

This file was deleted.

29 changes: 0 additions & 29 deletions client/Dockerfile

This file was deleted.

0 comments on commit 848f54f

Please sign in to comment.