Skip to content
Snippets Groups Projects
Verified Commit 49d4422b authored by Adrian Paschkowski's avatar Adrian Paschkowski :thinking:
Browse files

Update deployment and docs

parent f8496500
No related branches found
No related tags found
No related merge requests found
node_modules node_modules/
npm-debug.log dist/
build/
.idea/
.env
npm-debug.log*
yarn-debug.log*
yarn-error.log*
PORT=3000
MINIO_HOST=
MINIO_PORT=
MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=
MINIO_SSL=true
MINIO_BUCKET=
TELEGRAM_TOKEN=
DATABASE_URL=
FROM node:16 FROM node:18
ARG DATABASE_URL
WORKDIR /app WORKDIR /app
...@@ -14,4 +13,4 @@ RUN npx prisma db push ...@@ -14,4 +13,4 @@ RUN npx prisma db push
RUN npm run build RUN npm run build
EXPOSE 3000 EXPOSE 3000
CMD [ "npm", "run", "start:prod" ] CMD [ "npm", "run", "start" ]
# LISSY API # LISSY API
The API powering lissy.ai-rub.de
## Deployment
Open a `psql -U postgres` shell inside the PostgreSQL container and run: Open a `psql -U postgres` shell inside the PostgreSQL container and run:
```sql ```sql
...@@ -9,8 +13,6 @@ CREATE DATABASE lissy OWNER lissy; ...@@ -9,8 +13,6 @@ CREATE DATABASE lissy OWNER lissy;
```sh ```sh
sudo docker volume create lissy-api
sudo docker build \ sudo docker build \
--build-arg DATABASE_URL=postgresql://lissy:1234@postgres:5432/lissy \ --build-arg DATABASE_URL=postgresql://lissy:1234@postgres:5432/lissy \
-t ai/lissy-api:latest . -t ai/lissy-api:latest .
...@@ -18,8 +20,13 @@ sudo docker build \ ...@@ -18,8 +20,13 @@ sudo docker build \
sudo docker run \ sudo docker run \
--name lissy-api \ --name lissy-api \
--restart unless-stopped \ --restart unless-stopped \
-v lissy-api:/app/photos \ -e MINIO_HOST=cdn.ai-rub.de \
-e BOT_TOKEN=<REPLACE> \ -e MINIO_PORT=443 \
-e MINIO_ACCESS_KEY=lissy \
-e MINIO_SECRET_KEY=<REPLACE> \
-e MINIO_SSL=true \
-e MINIO_BUCKET=lissy \
-e TELEGRAM_TOKEN=<REPLACE> \
-e DATABASE_URL=postgresql://lissy:1234@postgres:5432/lissy \ -e DATABASE_URL=postgresql://lissy:1234@postgres:5432/lissy \
-d ai/lissy-api:latest -d ai/lissy-api:latest
......
{ {
"name": "lissy-api", "name": "lissy-api",
"version": "2.0.0", "version": "2.0.0",
"scripts": {
"build": "nest build",
"start": "node dist/main",
"dev": "nest start --watch",
"debug": "nest start --debug --watch"
},
"dependencies": { "dependencies": {
"@nestjs/apollo": "^10.1.3", "@nestjs/apollo": "^10.1.3",
"@nestjs/common": "^9.1.2", "@nestjs/common": "^9.1.2",
...@@ -42,4 +48,4 @@ ...@@ -42,4 +48,4 @@
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.8.4" "typescript": "^4.8.4"
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment