-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
5 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.