mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 09:23:07 +02:00
feat(docker): add docker-compose.yml (#387)
* Add Docker-compose * refactor(docker): improve compose file --------- Co-authored-by: Isaac <git@eartharoid.me>
This commit is contained in:
parent
64da241a76
commit
cb4e253dda
@ -21,4 +21,4 @@ ENV NODE_ENV=production \
|
||||
WORKDIR /usr/bot
|
||||
COPY --from=builder /build ./
|
||||
EXPOSE ${HTTP_PORT}
|
||||
ENTRYPOINT [ "/bin/sh", "/usr/bot/scripts/start.sh" ]
|
||||
ENTRYPOINT [ "/usr/bot/scripts/start.sh" ]
|
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
@ -0,0 +1,53 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8
|
||||
restart: unless-stopped
|
||||
hostname: mysql
|
||||
networks:
|
||||
- discord-tickets
|
||||
volumes:
|
||||
- tickets-mysql:/var/lib/mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: tickets
|
||||
MYSQL_PASSWORD: insecure # change this to a secure password
|
||||
MYSQL_ROOT_PASSWORD: insecure # change this to a (different) secure password
|
||||
MYSQL_USER: tickets
|
||||
|
||||
bot:
|
||||
image: discord-tickets:4.0
|
||||
depends_on:
|
||||
- mysql
|
||||
restart: unless-stopped
|
||||
hostname: bot
|
||||
networks:
|
||||
- discord-tickets
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
- tickets-bot:/usr/bot/user
|
||||
# Please refer to the documentation:
|
||||
# https://discordtickets.app/self-hosting/configuration/#environment-variables
|
||||
environment:
|
||||
DB_CONNECTION_URL: mysql://tickets:insecure@mysql/tickets # change `insecure` to the MYSQL_PASSWORD you set above
|
||||
DISCORD_SECRET: # required
|
||||
DISCORD_TOKEN: # required
|
||||
ENCRYPTION_KEY: # required
|
||||
DB_PROVIDER: mysql
|
||||
HTTP_EXTERNAL: http://127.0.0.1:8080 # change this to your server's external IP (or domain)
|
||||
HTTP_HOST: 0.0.0.0
|
||||
HTTP_PORT: 80
|
||||
HTTP_TRUST_PROXY: false # set to true if you're using a reverse proxy
|
||||
PUBLIC_BOT: false
|
||||
OVERRIDE_ARCHIVE: null
|
||||
SETTINGS_PORT: 8169
|
||||
SETTINGS_HOST: 127.0.0.1
|
||||
SUPER: !!str 319467558166069248 # optionally add `,youruseridhere`
|
||||
|
||||
networks:
|
||||
discord-tickets:
|
||||
|
||||
volumes:
|
||||
tickets-mysql:
|
||||
tickets-bot:
|
Loading…
Reference in New Issue
Block a user