chendeben 9 سال پیش
والد
کامیت
a759e1bcce
2فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 2 1
      db/Dockerfile
  2. 1 3
      docker-compose.yml

+ 2 - 1
db/Dockerfile

@@ -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

+ 1 - 3
docker-compose.yml

@@ -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:
     build:
       context: ./yidu