Skip to content

Commit 4d7f5e9

Browse files
committed
Add mssql docker-compose example
1 parent d972382 commit 4d7f5e9

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

examples/mssql/docker-compose.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# Example for Microsoft SQL Server
3+
#
4+
5+
version: '2'
6+
7+
networks:
8+
example-mssql-net:
9+
name: example-mssql-net
10+
11+
services:
12+
example-mssql-db:
13+
hostname: example-db-host
14+
image: mcr.microsoft.com/mssql/server:2019-latest
15+
container_name: example-mssql-db
16+
restart: unless-stopped
17+
ports:
18+
- "127.0.0.1:11433:1433"
19+
networks:
20+
example-mssql-net:
21+
volumes:
22+
- ./tmp/backups:/tmp/backups # shared tmp backup directory
23+
environment:
24+
ACCEPT_EULA: Y
25+
MSSQL_SA_PASSWORD: 5hQa0utRFBpIY3yhoIyE
26+
MSSQL_PID: Express
27+
28+
example-mssql-db-backup:
29+
container_name: example-mssql-db-backup
30+
# if you want to build and use image from current source
31+
# execute in terminal --> docker build -t tiredofit/db-backup-mssql .
32+
# replace --> image: tiredofit/db-backup-mssql
33+
# image: tiredofit/db-backup
34+
image: tiredofit/db-backup-mssql
35+
links:
36+
- example-mssql-db
37+
volumes:
38+
- ./backups:/backup
39+
- ./tmp/backups:/tmp/backups # shared tmp backup directory
40+
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
41+
environment:
42+
# - DEBUG_MODE=TRUE
43+
- DB_TYPE=mssql
44+
- DB_HOST=example-db-host
45+
# - DB_PORT=1488
46+
# - DB_NAME=ALL # [ALL] not working on sql server.
47+
# create database with name `test1` manually first
48+
- DB_NAME=test1
49+
- DB_USER=sa
50+
- DB_PASS=5hQa0utRFBpIY3yhoIyE
51+
- DB_DUMP_FREQ=1 # backup every minute
52+
# - DB_DUMP_BEGIN=0000 # backup starts immediately
53+
- DB_CLEANUP_TIME=5 # clean backups they are older than 5 minute
54+
- ENABLE_CHECKSUM=FALSE
55+
- CHECKSUM=SHA1
56+
- COMPRESSION=GZ
57+
- SPLIT_DB=FALSE
58+
- CONTAINER_ENABLE_MONITORING=FALSE
59+
restart: always
60+
networks:
61+
example-mssql-net:

0 commit comments

Comments
 (0)