Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Commit

Permalink
Add docker compose with mysql support
Browse files Browse the repository at this point in the history
  • Loading branch information
andrusha committed Jun 24, 2020
1 parent e7e346d commit 6450a46
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
version: "3.8"
services:
mysql:
image: mysql:5.7
restart: always
command: --init-file /data/application/init.sql
volumes:
- ./init.sql:/data/application/init.sql
environment:
MYSQL_ROOT_PASSWORD: 76q6wcHQsPrKxkEW87RAmYaKpfVDuL
MYSQL_DATABASE: tikvidbot
MYSQL_USER: tikvidbot
MYSQL_PASSWORD: 3XV11JZgwADtt3k9rAVJJlfAqPXVxN

tikvidbot:
depends_on:
- mysql
build: .
restart: always
environment:
BOT_NAME:
BOT_TOKEN:
DB_HOST: mysql
DB_NAME: tikvidbot
DB_USER: tikvidbot
DB_PASS: 3XV11JZgwADtt3k9rAVJJlfAqPXVxN
LIMITER_ENABLED: true
LIMITER_WINDOW: 30000
LIMITER_LIMIT: 10
HTTP_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko)
7 changes: 7 additions & 0 deletions init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
USE tikvidbot;

CREATE TABLE IF NOT EXISTS `sessions` (
`id` varchar(100) NOT NULL,
`session` longtext NOT NULL,
PRIMARY KEY (`id`));

0 comments on commit 6450a46

Please sign in to comment.