-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
44 lines (39 loc) · 1002 Bytes
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3.4'
services:
TranslateBot:
image: translateimg
container_name: translatebot
restart: always
build:
context: .
dockerfile: Dockerfile
args:
tokemBot: ${TOKEN}
networks:
- tral
depends_on:
- database
database:
image: mysql
container_name: translatebotbase
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_DATABASE: 'db'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'user'
# You can use whatever password you like
MYSQL_PASSWORD: 'password'
# Password for root access
MYSQL_ROOT_PASSWORD: 'password'
# Where our data will be persisted
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
- /root/repo/bacupTranslate/:/var/lib/mysql/ # Backup folder in host mapped to backup
networks:
- tral
volumes:
my-db:
networks:
tral:
driver: bridge