mirror of
https://github.com/zhigang1992/server-components-demo.git
synced 2026-01-12 09:33:54 +08:00
* Fixes docker-compose & pg initialization - ./scripts/init_db.sh is not executable (/bin/bash: bad interpreter: Permission denied) - same script fails because user is already created, only table creation is necessary. * Actually fix docker-compose development workflow * Incorporate PR feedback * Remove credentials.json
34 lines
739 B
YAML
34 lines
739 B
YAML
version: "3.8"
|
|
services:
|
|
postgres:
|
|
image: postgres:13
|
|
environment:
|
|
POSTGRES_USER: notesadmin
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: notesapi
|
|
ports:
|
|
- '5432:5432'
|
|
volumes:
|
|
- ./scripts/init_db.sh:/docker-entrypoint-initdb.d/init_db.sh
|
|
- db:/var/lib/postgresql/data
|
|
|
|
notes-app:
|
|
build:
|
|
context: .
|
|
depends_on:
|
|
- postgres
|
|
ports:
|
|
- '4000:4000'
|
|
environment:
|
|
DB_HOST: postgres
|
|
volumes:
|
|
- ./notes:/opt/notes-app/notes
|
|
- ./public:/opt/notes-app/public
|
|
- ./scripts:/opt/notes-app/scripts
|
|
- ./server:/opt/notes-app/server
|
|
- ./src:/opt/notes-app/src
|
|
- ./credentials.js:/opt/notes-app/credentials.js
|
|
|
|
volumes:
|
|
db:
|