| 
 | 1 | +version: '3'  | 
 | 2 | +services:  | 
 | 3 | + express-app:  | 
 | 4 | + build:  | 
 | 5 | + args:  | 
 | 6 | + - NODE_ENV=development  | 
 | 7 | + context: express-app  | 
 | 8 | + target: development  | 
 | 9 | + environment:  | 
 | 10 | + - DATABASE_DB=surveyjs  | 
 | 11 | + - DATABASE_USER=postgres  | 
 | 12 | + - DATABASE_PASSWORD=/run/secrets/db-password  | 
 | 13 | + - DATABASE_HOST=postgres  | 
 | 14 | + - NODE_ENV=development  | 
 | 15 | + ports:  | 
 | 16 | + - 9080:3000  | 
 | 17 | + secrets:  | 
 | 18 | + - db-password  | 
 | 19 | + volumes:  | 
 | 20 | + - ./express-app:/code/express-app  | 
 | 21 | + - ./public:/code/public  | 
 | 22 | + networks:  | 
 | 23 | + - surveyjs-net  | 
 | 24 | + depends_on:  | 
 | 25 | + - postgres  | 
 | 26 | + postgres:  | 
 | 27 | + build:  | 
 | 28 | + context: postgres  | 
 | 29 | + secrets:  | 
 | 30 | + - db-password  | 
 | 31 | + environment:  | 
 | 32 | + POSTGRES_DB: "surveyjs"  | 
 | 33 | + POSTGRES_USER: "postgres"  | 
 | 34 | + # POSTGRES_PASSWORD: "123456"  | 
 | 35 | + POSTGRES_PASSWORD_FILE: "/run/secrets/db-password"  | 
 | 36 | + PGDATA: "/var/lib/postgresql/data/pgdata"  | 
 | 37 | + volumes:  | 
 | 38 | + - ./postgres/initdb:/docker-entrypoint-initdb.d  | 
 | 39 | + - ./postgres/data:/var/lib/postgresql/data  | 
 | 40 | + ports:  | 
 | 41 | + - 9432:5432  | 
 | 42 | + networks:  | 
 | 43 | + - surveyjs-net  | 
 | 44 | + healthcheck:  | 
 | 45 | + test: ["CMD-SHELL", "pg_isready -U postgres -d public"]  | 
 | 46 | + interval: 10s  | 
 | 47 | + timeout: 5s  | 
 | 48 | + retries: 5  | 
 | 49 | + start_period: 10s  | 
 | 50 | + restart: unless-stopped  | 
 | 51 | +networks:  | 
 | 52 | + surveyjs-net:  | 
 | 53 | + driver: bridge  | 
 | 54 | +secrets:  | 
 | 55 | + db-password:  | 
 | 56 | + file: ./postgres/password.txt  | 
0 commit comments