Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add node js app to load the miniapp and communicate with the telegram… #1

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bot/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BOT_TOKEN=
WEB_APP_URL=
3 changes: 3 additions & 0 deletions bot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build
/node_modules
.env
13 changes: 13 additions & 0 deletions bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20

RUN npm install -g pnpm
WORKDIR /app
COPY package.json ./
COPY pnpm-lock.yaml ./
RUN pnpm i
COPY . .

EXPOSE 8000

RUN pnpm build
CMD pnpm start
40 changes: 40 additions & 0 deletions bot/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: "3"

services:
mongo:
image: mongo:latest
container_name: mongo

environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
networks:
- DATABASE
volumes:
- type: volume
source: MONGO_DATA
target: /data/db
- type: volume
source: MONGO_CONFIG
target: /data/configdb
app:
container_name: app
build: .
restart: unless-stopped
ports:
- "8000:8000"
depends_on:
- mongo
env_file: .env
networks:
- DATABASE

networks:
DATABASE:
name: DATABASE

volumes:
MONGO_DATA:
name: MONGO_DATA
MONGO_CONFIG:
name: MONGO_CONFIG
Loading