Skip to content

Commit

Permalink
Update the docker compose files for production (#195)
Browse files Browse the repository at this point in the history
* Update docker-compose files and add name

* Add prod environment variables to .env.example

* Update .dockerignore to exclude .python-version file

* Add production docker compose command
  • Loading branch information
klaasnicolaas committed May 27, 2024
1 parent 0dad79d commit 03153c0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.git
.github
.dockerignore
.python-version

.env
.env.dev
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ Use docker compose to build and run the container:
```bash
docker-compose up -d --build
```

Run in production mode:

```bash
docker compose -f prod/production.yml up -d
```

</details>

<!-- Links -->
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
name: dds-discord
services:
# Discord bot
bot:
Expand Down
17 changes: 17 additions & 0 deletions prod/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BOT_TOKEN=
OWNER_ID=

GUILD_ID=

# Discord Role IDs
ROOKIE_ROLE_ID=
ADVANCED_ROLE_ID=
ANALOG_ROLE_ID=
DIGITAL_ROLE_ID=
RACING_ROLE_ID=
FREESTYLE_ROLE_ID=

# Twitch API
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
TWITCH_CHANNEL_ID=
5 changes: 3 additions & 2 deletions prod/production.example.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: "3"

---
name: dds-discord
services:
# Discord bot - production
discord-bot:
Expand All @@ -8,6 +8,7 @@ services:
tty: true
environment:
BOT_TOKEN: ""
TWITCH_CHANNEL_ID: ""
deploy:
mode: replicated
replicas: 1
Expand Down

0 comments on commit 03153c0

Please sign in to comment.