-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-run.sh
More file actions
47 lines (37 loc) · 1.13 KB
/
docker-run.sh
File metadata and controls
47 lines (37 loc) · 1.13 KB
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
39
40
41
42
43
44
45
46
47
#!/bin/bash
## Run commands to make deploy similar to cloud in
## stand-alone containers
DCK_PRE=sf #DCK_PRE or docker prefix to identify docker group
VOL_BASE="$(pwd)"
VOL_OCFL="$VOL_BASE/ocfl/"
VOL_CONFIG="$VOL_BASE/config/"
PORT=8080
NETWORK=${DCK_PRE}-main
docker network create --driver bridge ${NETWORK}
docker run --rm -p 127.0.0.1:11211:11211 \
--name ${DCK_PRE}-memcached \
-d \
--network ${NETWORK} \
memcached
# For MacOS creating a docker volume that we can identify
# For Linux this is not required and can use a bind mount
# replace '-v solr_ocfl' with ${VOL_SOLR}
# and chmod 8983:8983 ${VOL_SOLR} directory
# more here https://docs.docker.com/docker-for-mac/osxfs/
docker volume create ${DCK_PRE}-solr_ocfl
docker run --rm -p 127.0.0.1:8983:8983 \
-v ${DCK_PRE}-solr_ocfl:/var/solr:delegated \
--name ${DCK_PRE}-solr \
--network ${NETWORK} \
-d \
solr:8.6.3 \
solr-precreate ocfl
docker run --rm -p 127.0.0.1:${PORT}:${PORT} \
-e NODE_ENV=development \
-v ${VOL_CONFIG}:/etc/share/config \
-v ${VOL_OCFL}:/etc/share/ocfl \
--name ${DCK_PRE}-oni-express \
--network ${NETWORK} \
-d \
oni-express
echo "open http://localhost:${PORT}"