mirror of
https://github.com/Haiti-Distributed-Healthcare-System/hdhs.git
synced 2026-10-26 17:35:23 +00:00
Working docker compose with PostgreSQL, using mounted volumes, need to change database env vars
This commit is contained in:
1 parent
d257fba1c9
commit
36664d14a4
2 files changed
+14
-1
No files matched your search
@@ -0,0 +1,3 @@
|
||||
POSTGRES_USER=user
|
||||
POSTGRES_PASSWORD=password
|
||||
POSTGRES_DB=database
|
||||
+11
-1
@@ -8,4 +8,14 @@ services:
|
||||
- ./pwa/:/app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
container_name: haiti_pwa
|
||||
container_name: haiti_pwa
|
||||
|
||||
database:
|
||||
image: "postgres" # use latest official postgres version
|
||||
env_file:
|
||||
- database.env # configure postgres
|
||||
volumes:
|
||||
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
|
||||
|
||||
volumes:
|
||||
database-data: # named volumes can be managed easier using docker-compose
|
||||
Reference in new issue
Block a user