Skip to content

Commit b8e89d0

Browse files
authored
Update and rename docker-compose_full.yml to docker-compose_dbonly.yml
1 parent c18d6c8 commit b8e89d0

File tree

2 files changed

+31
-74
lines changed

2 files changed

+31
-74
lines changed

docker-compose_dbonly.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
services:
2+
db:
3+
image: postgres:13
4+
restart: unless-stopped
5+
environment:
6+
- POSTGRES_DB=postgres
7+
- POSTGRES_USER=postgres
8+
- POSTGRES_PASSWORD=password # Change this to a secure password
9+
volumes:
10+
- db-data:/var/lib/postgresql/data
11+
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
12+
- ./migrations.sql:/migrations.sql
13+
14+
# Make sure you download the migrations.sql file if you are updating your existing database. If you changed the user or database name, you will need to plug that in in the command below.
15+
command: >
16+
bash -c "
17+
docker-entrypoint.sh postgres &
18+
until pg_isready; do sleep 1; done;
19+
psql -U postgres -d postgres -f /migrations.sql;
20+
wait
21+
"
22+
ports:
23+
- "5432:5432"
24+
healthcheck:
25+
test: ["CMD-SHELL", "pg_isready -U postgres"]
26+
interval: 10s
27+
timeout: 5s
28+
retries: 5
29+
30+
volumes:
31+
db-data:

docker-compose_full.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)