File tree Expand file tree Collapse file tree 8 files changed +34
-34
lines changed
Expand file tree Collapse file tree 8 files changed +34
-34
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ ANSIBLE_VAULT_KEY=${ANSIBLE_VAULT_KEY}
22ENV=${ ENV}
33FLOWER_PORT=${ FLOWER_PORT}
44FLOWER_PASSWORD=${ FLOWER_PASSWORD}
5+ HOST_POSTGRES_DUMP=${ HOST_POSTGRES_DUMP}
56MAPBOX_API_KEY=${ MAPBOX_API_KEY}
67POSTGRES_HOST=${ POSTGRES_HOST}
78POSTGRES_PORT=${ POSTGRES_PORT}
Original file line number Diff line number Diff line change 1010 ENV : dev
1111 FLOWER_PORT : 28888
1212 FLOWER_PASSWORD : flowerpass
13+ HOST_POSTGRES_DUMP : /tmp/dump
1314 POSTGRES_HOST : epigraphhub-db
1415 POSTGRES_PORT : 25432
1516 POSTGRES_USER : dev_epigraph
Original file line number Diff line number Diff line change 88DOCKER =docker-compose \
99 --env-file .env \
1010 --project-name eph-$(ENV ) \
11- --file docker/compose-base.yaml \
12- --file docker/compose-$(ENV ) .yaml
11+ --file docker/compose.yaml
1312
1413# DOCKER
1514
@@ -22,14 +21,19 @@ docker-build:
2221
2322.PHONY :docker-start
2423docker-start :
25- $(DOCKER ) up -d ${SERVICES}
24+ $(DOCKER ) up --remove-orphans - d ${SERVICES}
2625
2726
2827.PHONY :docker-stop
2928docker-stop :
3029 $(DOCKER ) stop ${SERVICES}
3130
3231
32+ .PHONY :docker-down
33+ docker-down :
34+ $(DOCKER ) down --volumes
35+
36+
3337.PHONY :docker-restart
3438docker-restart : docker-stop docker-start
3539 echo " [II] Docker services restarted!"
@@ -38,6 +42,10 @@ docker-restart: docker-stop docker-start
3842docker-logs-follow :
3943 $(DOCKER ) logs --follow --tail 300 ${SERVICES}
4044
45+ .PHONY :docker-logs-follow
46+ docker-logs-follow :
47+ $(DOCKER ) logs --follow --tail 100 ${SERVICES}
48+
4149.PHONY :docker-logs
4250docker-logs :
4351 $(DOCKER ) logs --tail 300 ${SERVICES}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ services:
4141 ports :
4242 - ${SUPERSET_PORT}:8088
4343 depends_on :
44+ - epigraphhub-db
4445 - epigraphhub-redis
4546 - epigraphhub-celery
4647 - epigraphhub-celery-beat
@@ -167,3 +168,4 @@ services:
167168
168169volumes :
169170 redis :
171+ pgdata :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ PROJECT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && cd ../.. && pwd ) "
4+
5+ if [ -f ${PROJECT_DIR} /.env ]; then
6+ # Load Environment Variables
7+ export $( cat ${PROJECT_DIR} /.env | grep -v ' #' | sed ' s/\r$//' | awk ' /=/ {print $1}' )
8+ fi
9+
10+ HOST_POSTGRES_DUMP=${HOST_POSTGRES_DUMP:-/ tmp/ dump}
11+ mkdir -p ${HOST_POSTGRES_DUMP}
12+
13+ set -ex
14+
15+ PGPASSWORD=${POSTGRES_PASSWORD} pg_dumpall \
16+ --host ${POSTGRES_HOST} \
17+ --port ${POSTGRES_PORT} \
18+ --user ${POSTGRES_USER} \
19+ > ${HOST_POSTGRES_DUMP} /$( date --iso-8601) .dump
You can’t perform that action at this time.
0 commit comments