-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
38 lines (37 loc) · 1.1 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: '3.4'
services:
pgweb:
image: sosedoff/pgweb:0.9.12
ports:
- 8081:8081
links:
- postgres
environment:
DATABASE_URL: postgres://laboradmin:laboradmin@postgres:5432/laboradmin?sslmode=disable
command: sh -c "sleep 10 && /usr/bin/pgweb --bind=0.0.0.0 --listen=8081"
postgres:
image: postgres:9-alpine
environment:
POSTGRES_USER: laboradmin
POSTGRES_PASSWORD: laboradmin
POSTGRES_DB: laboradmin
backend:
build: .
ports:
- 7000:7000
command: >
sh -c "
until PGPASSWORD=laboradmin psql -h postgres -p 5432 -U laboradmin -d laboradmin -c '\q';
do
echo 'Waiting for Postgres...'
sleep 5
done
PGPASSWORD=laboradmin psql -h postgres -p 5432 -U laboradmin -d laboradmin -c 'CREATE EXTENSION unaccent;'
npm run cli:dev dev-init -- -y && \
npm run start:dev"
environment:
LABORADMIN_DB_HOST: postgres
LABORADMIN_DB_PORT: 5432
LABORADMIN_DB_NAME: laboradmin
LABORADMIN_DB_USER: laboradmin
LABORADMIN_DB_PASSWORD: laboradmin