Compare commits
	
		
			12 Commits
		
	
	
		
			1e035859fb
			...
			main
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d674867968 | |||
| 5e53aacaae | |||
| 6313a7d3e5 | |||
| c1ddeaf485 | |||
| 7bea919bd4 | |||
| 5eaafa923c | |||
| dd530199b2 | |||
| 268cb5ee0a | |||
| a218eb606b | |||
| 6705a83880 | |||
| b8033d1d12 | |||
| bfa00a924f | 
							
								
								
									
										5
									
								
								.gitea/template
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.gitea/template
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# Use template filling in these files:
 | 
			
		||||
docker-compose.yaml
 | 
			
		||||
Dockerfile
 | 
			
		||||
Cargo.toml
 | 
			
		||||
README.md
 | 
			
		||||
@@ -1,5 +1,8 @@
 | 
			
		||||
[package]
 | 
			
		||||
name = "discord-word-counter"
 | 
			
		||||
name = "${REPO-NAME}"
 | 
			
		||||
authors = ["${REPO_OWNER}", "${TEMPLATE_OWNER}"]
 | 
			
		||||
description = "${REPO_DESCRIPTION}"
 | 
			
		||||
repository = "${REPO_HTTPS_URL}"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
edition = "2021"
 | 
			
		||||
 | 
			
		||||
@@ -8,7 +11,7 @@ edition = "2021"
 | 
			
		||||
[dependencies]
 | 
			
		||||
tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] }
 | 
			
		||||
# songbird = { version = "0.3.2", features = ["yt-dlp"] }
 | 
			
		||||
poise = { path = "../poise/", features = ["cache"] }
 | 
			
		||||
poise = { version = "0.5.7", features = ["cache"] }
 | 
			
		||||
dotenv = "0.15.0"
 | 
			
		||||
anyhow = "1.0.75"
 | 
			
		||||
url = "2.4.1"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
# Build the execuitible 
 | 
			
		||||
FROM rustlang/rust:nightly as builder
 | 
			
		||||
ENV RUSTFLAGS=""
 | 
			
		||||
 | 
			
		||||
WORKDIR /bot
 | 
			
		||||
# RUN apt-get update && apt-get upgrade -y 
 | 
			
		||||
COPY . .
 | 
			
		||||
RUN cargo build --release
 | 
			
		||||
 | 
			
		||||
# Now make the runtime container
 | 
			
		||||
FROM debian:bookworm-slim
 | 
			
		||||
 | 
			
		||||
RUN apt-get update && apt-get upgrade -y && apt-get clean
 | 
			
		||||
COPY --from=builder /bot/target/release/${REPO-NAME} /usr/local/bin/${REPO-NAME}
 | 
			
		||||
COPY Cargo.lock /
 | 
			
		||||
 | 
			
		||||
CMD ["/usr/local/bin/${REPO-NAME}"]
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
# discord-bot-template
 | 
			
		||||
# ${REPO_NAME}
 | 
			
		||||
 | 
			
		||||
A quick rust-based discord bot template.
 | 
			
		||||
${REPO_DESCRIPTION}
 | 
			
		||||
 | 
			
		||||
## Getting started
 | 
			
		||||
* goto: [Discord applicatoins](https://discord.com/developers/applications) and
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										30
									
								
								docker-compose.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								docker-compose.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
version: '3.1'
 | 
			
		||||
name: ${REPO_NAME}
 | 
			
		||||
services:
 | 
			
		||||
  bot:
 | 
			
		||||
    container_name: ${REPO_NAME}_bot
 | 
			
		||||
    build: ${REPO_HTTPS_URL}
 | 
			
		||||
    restart: always
 | 
			
		||||
    environment:
 | 
			
		||||
      # These will read from the .env file
 | 
			
		||||
      DISCORD_INTENTS: $${DISCORD_INTENTS}
 | 
			
		||||
      DISCORD_TOKEN: $${DISCORD_TOKEN}
 | 
			
		||||
      DISCORD_ID: $${DISCORD_ID}
 | 
			
		||||
    networks:
 | 
			
		||||
      - external
 | 
			
		||||
      - internal
 | 
			
		||||
  redis:
 | 
			
		||||
    container_name: ${REPO_NAME}_redis
 | 
			
		||||
    image: redis
 | 
			
		||||
    restart: always
 | 
			
		||||
    ports:
 | 
			
		||||
      - 6379:6379
 | 
			
		||||
    networks:
 | 
			
		||||
      - internal
 | 
			
		||||
 | 
			
		||||
networks:
 | 
			
		||||
  internal:
 | 
			
		||||
    driver: bridge
 | 
			
		||||
    internal: true
 | 
			
		||||
  external:
 | 
			
		||||
    driver: bridge
 | 
			
		||||
		Reference in New Issue
	
	Block a user