@@ -2,4 +2,5 @@ FROM postgres
MAINTAINER chendeben <chendeben@qq.com>
-RUN chown -R postgres:postgres /var/lib/postgresql/data
+RUN chown -R postgres:postgres /var/lib/postgresql/data && \
+ chmod -R 700 /var/lib/postgresql/data
@@ -4,12 +4,10 @@ services:
yidu_postgres:
build:
context: ./db
- environment:
- - PGDATA=/postgresql/data
ports:
- "5432:5432"
volumes:
- - ./db/data:/postgresql/data
+ - ./db/data:/var/lib/postgresql/data
yidu:
context: ./yidu