Skip to content
Open
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: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GUILD_ID="CHANNEL_ID"
# https://discord.com/developers/applications/{CLIENT_ID}/bot get token by using reset
TOKEN="BOT_TOKEN"

MYSQL_ROOT_HOST=db
MYSQL_HOST=db
MYSQL_ROOT_PASSWORD=mypassword
MYSQL_DATABASE=mydatabase
MYSQL_USER=myuser
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ COPY . .
COPY wait-for-it.sh wait-for-it.sh
RUN chmod +x wait-for-it.sh

CMD node deploy-commands.js && node index.js
CMD ["./wait-for-it.sh", "db:3306", "--timeout=30", "--", "bash", "-c", "node deploy-commands.js && node index.js"]
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ services:
context: .
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- db
command: ["./wait-for-it.sh", "db:3306", "--timeout=30", "--", "bash", "-c", "node deploy-commands.js && node index.js"]
restart: always

db:
image: mysql:8.0
image: linuxserver/mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
Expand Down
Loading