-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 2ffd54b
Showing
12 changed files
with
1,639 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
* | ||
!src/ | ||
!prisma/ | ||
!.env | ||
!package.json | ||
!package-lock.json |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# comment out database url if you are using docker | ||
#DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public" | ||
DISCORD_TOKEN="dontsharethis!" | ||
DISCORD_CLIENT_ID="123456789012345678" | ||
DISCORD_SERVER_ID="123456789012345678" # this bot is only designed to work in one server | ||
DISCORD_CHANNEL_ID="123456789012345678" # this bot is only designed to work in one channel | ||
ACTIVITY="s$help for commands" | ||
PREFIX="s$" |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docker-compose.yml | ||
data/graph.gexf | ||
postgres-data/ | ||
.env | ||
node_modules/ |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:22-alpine | ||
WORKDIR /app | ||
COPY package.json package.json | ||
COPY package-lock.json package-lock.json | ||
|
||
RUN npm install | ||
|
||
# copy src/, prisma/, .env | ||
COPY src/ src/ | ||
COPY prisma/ prisma/ | ||
COPY .env .env | ||
|
||
RUN npx prisma generate | ||
CMD ["npm", "run", "bot"] |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# stats.atl.dev backend | ||
right now some things may be hard coded, please change them to not be hard coded if you know how |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
services: | ||
db: | ||
image: postgres | ||
restart: unless-stopped | ||
ports: | ||
- 5432:5432 # change ports if you have other postgres instances running | ||
volumes: | ||
- ./postgres-data/:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_PASSWORD=slightlysecurepassword123 # change this if you are stupid enough to use this app in production | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_DB=postgres | ||
- PGDATA=/var/lib/postgresql/data/pgdata | ||
adminer: # you should probably remove this in production | ||
image: adminer | ||
restart: unless-stopped | ||
ports: | ||
- 8081:8080 | ||
nginx: | ||
image: nginx | ||
restart: unless-stopped | ||
ports: | ||
- 8080:8080 # this is a really common port and should be changed most likely to something else | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
- ./public/:/usr/share/nginx/html/public | ||
- ./data/:/usr/share/nginx/html/data | ||
app: | ||
build: . | ||
restart: unless-stopped | ||
ports: | ||
- 8000:8000 # in busy environments you might want to change this if port 8000 is already in use | ||
volumes: | ||
- ./data/:/app/data | ||
depends_on: | ||
- db | ||
- nginx | ||
environment: | ||
- DATABASE_URL=postgresql://postgres:slightlysecurepassword123@db:5432/postgres |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
events {} | ||
|
||
http { | ||
server { | ||
root /usr/share/nginx/html; | ||
listen 8080; | ||
|
||
# reverse proxy to port 8000 | ||
location / { | ||
proxy_pass http://app:8000; | ||
} | ||
|
||
# Serve static files in /data | ||
location /data { | ||
alias /usr/share/nginx/html/data; | ||
} | ||
} | ||
} |
Oops, something went wrong.