-
-
Notifications
You must be signed in to change notification settings - Fork 526
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (62 loc) · 2.53 KB
/
docker-compose.yml
File metadata and controls
66 lines (62 loc) · 2.53 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Create database containers to simplify running tests.
# NB: Init scripts are executed in alphabetic order, hence the renaming of files
# within the container to ensure "model" migrations (i.e. those creating tables)
# are executed before those to seed records. After making changes to any init
# scripts you'll have to `docker-compose down` and `docker-compose up` to see
# this reflected within the containers.
# Database containers don't have persistent volumes. This means any changes you
# make (eg. inserting records) will be lost after a `docker-compose down` and
# `docker-compose up`.
version: "3.5"
services:
mssql:
build:
context: ./
dockerfile: mssql.Dockerfile
environment:
ACCEPT_EULA: "Y"
MSSQL_PID: "Developer"
SA_PASSWORD: "Sequelizeauto!"
ports:
- 1433:1433
volumes:
- ./sample/dbscripts/mssql-sample-model.sql:/usr/db/mssql-sample-model.sql
- ./sample/dbscripts/mssql-sample-data.sql:/usr/db/mssql-sample-data.sql
mysql:
environment:
MYSQL_DATABASE: "northwind"
MYSQL_USER: "sequelizeauto"
MYSQL_PASSWORD: "Sequelizeauto!"
MYSQL_ROOT_PASSWORD: "Sequelizeauto!"
image: mysql:8.0
ports:
- 3306:3306
restart: always
volumes:
- ./sample/dbscripts/mysql-sample-model.sql:/docker-entrypoint-initdb.d/001.mysql-sample-model.sql
- ./sample/dbscripts/mysql-sample-data.sql:/docker-entrypoint-initdb.d/002.mysql-sample-data.sql
postgres:
environment:
POSTGRES_USER: "sequelizeauto"
POSTGRES_PASSWORD: "Sequelizeauto!"
POSTGRES_DB: "northwind"
image: postgres:12
ports:
- 5432:5432
restart: always
volumes:
- ./sample/dbscripts/postgres-sample-model.sql:/docker-entrypoint-initdb.d/001.postgres-sample-model.sql
- ./sample/dbscripts/postgres-sample-data.sql:/docker-entrypoint-initdb.d/002.postgres-sample-data.sql
# Unlike the other databases, sqlite doesn't require leaving a process
# running. This container is just responsible for writing out a sqlite3
# database file in `sample/northwind.sqlite`. It's normal for this to
# exit immediately after generating this file. (As with other databases
# this is wiped and recreated from scratch on `docker-compose up`)
sqlite:
build:
context: ./
dockerfile: sqlite3.Dockerfile
volumes:
- ./sample/dbscripts/sqlite-sample-model.sql:/usr/db/sqlite-sample-model.sql
- ./sample/dbscripts/sqlite-sample-data.sql:/usr/db/sqlite-sample-data.sql
- ./sample/northwind.sqlite:/usr/db/northwind.sqlite