-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart
executable file
·30 lines (25 loc) · 1.08 KB
/
start
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
#!/bin/bash
trap "echo -ne '\nstopping container...' && docker stop refinery-updater > /dev/null 2>&1 && echo -ne '\t\t [done]\n'" EXIT
HOST_IP=$(docker network inspect bridge --format='{{json .IPAM.Config}}' | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | tail -1)
echo -ne 'stopping old container...'
docker stop refinery-updater > /dev/null 2>&1
echo -ne '\t [done]\n'
echo -ne 'building container...'
docker build -t refinery-updater-dev -f dev.Dockerfile . > /dev/null 2>&1
echo -ne '\t\t [done]\n'
echo -ne 'starting...'
docker run -d --rm \
--name refinery-updater \
-p 7062:80 \
-e S3_ENDPOINT_LOCAL=object-storage:9000 \
-e S3_ACCESS_KEY=kern \
-e S3_SECRET_KEY=r6ywtR33!DMlaL*SUUdy \
-e NEURAL_SEARCH=http://refinery-neural-search:80 \
-e COGNITION_GATEWAY=http://cognition-gateway:80 \
-e POSTGRES=postgresql://postgres:kern@graphql-postgres:5432 \
--mount type=bind,source="$(pwd)"/,target=/app \
-v /var/run/docker.sock:/var/run/docker.sock \
--network dev-setup_default \
refinery-updater-dev > /dev/null 2>&1
echo -ne '\t\t\t [done]\n'
docker logs -f refinery-updater