File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ POSTGRES_USER = postgres
2+ POSTGRES_PASSWORD = password
3+ POSTGRES_DB = postgres
Original file line number Diff line number Diff line change 1+ # https://hub.docker.com/_/postgres
2+ name : authentication
3+
4+ services :
5+ db :
6+ image : postgres:latest
7+ container_name : authentication_db
8+ restart : always
9+ env_file :
10+ - .env
11+ ports :
12+ - " 5433:5432"
13+ volumes :
14+ - db_data:/var/lib/postgresql/data
15+ networks :
16+ - vault_net
17+
18+ volumes :
19+ db_data :
20+
21+ networks :
22+ vault_net :
23+ external : true
Original file line number Diff line number Diff line change 1+ -- docker cp ./setup.sql authentication_db:/
2+ -- docker exec -it authentication_db bash
3+ -- psql -U postgres
4+ -- \i /setup.sql
5+
6+ -- Create db
7+ CREATE DATABASE authenticationdb ;
8+ CREATE DATABASE authenticationdb_test ;
9+
10+ -- Create flyway user
11+ CREATE USER flyway WITH PASSWORD ' password' SUPERUSER;
You can’t perform that action at this time.
0 commit comments