mirror of
https://github.com/docker-training/node-bulletin-board.git
synced 2025-05-17 19:39:31 +08:00
aaand the db init script
This commit is contained in:
parent
1e8fef83be
commit
e8d04c363d
@ -1,3 +1,10 @@
|
|||||||
sleep 30s
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P DockerCon!!! -i init-db.sql
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
|
CREATE TABLE Events(Id SERIAL, Title TEXT, Detail TEXT, Date DATE);
|
||||||
|
INSERT INTO Events (Title, Detail, Date) VALUES
|
||||||
|
('Docker for Beginners', 'Introduction to Docker using Node.js', '2017-11-21'),
|
||||||
|
('Advanced Orchestration', 'Deep dive into Docker Swarm', '2017-12-25'),
|
||||||
|
('Docker on Windows', 'From 101 to production', '2018-01-01');
|
||||||
|
EOSQL
|
Loading…
x
Reference in New Issue
Block a user