forked from code-chat-br/whatsapp-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker.sh
17 lines (11 loc) · 609 Bytes
/
docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
NET='codechat-net'
IMAGE='codechat/api:local'
if !(docker network ls | grep ${NET} > /dev/null)
then
docker network create -d bridge ${NET}
fi
sudo mkdir -p /data/instances
docker build -t ${IMAGE} .
# docker run --restart 'always' --name 'codechat_api' --mount 'type=bind,source=/data/instances,target=/home/api/instances' --publish '8083:8083' --hostname 'codechat' --network ${NET} ${IMAGE}
docker run -d --restart 'always' --name 'codechat_api' --mount 'type=bind,source=/data/instances,target=/codechat/instances' --publish '8083:8083' --hostname 'codechat' --network ${NET} ${IMAGE}