-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·38 lines (32 loc) · 919 Bytes
/
start.sh
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
#! /bin/bash
echo "sourcing .env"
set -a
source .env
set +a
echo "pulling containers"
docker pull nginx:1.24.0
echo "building containers"
docker build -t data_access_server .
echo "creating network"
docker network create -d bridge app_services_network
echo "starting containers"
docker run -d \
-e APP_CACHE_DATA=${APP_CACHE_DATA} \
-e APP_CACHE_ITEM_MAX=${APP_CACHE_ITEM_MAX} \
-e APP_S3_BUCKET=${APP_S3_BUCKET} \
-e APP_LOG_LEVEL=${APP_LOG_LEVEL} \
-e APP_PORT=${APP_PORT} \
-e APP_LOCAL_ONLY=${APP_LOCAL_ONLY} \
-v ${APP_CACHE_DIR}:/app_data_cache \
--expose ${APP_PORT} \
--network app_services_network \
--name data_access_server_app \
data_access_server
echo "pausing..."
sleep 5
docker run -d \
-p ${APP_PORT}:80 \
-v ${APP_NGINX_CONF}:/etc/nginx/nginx.conf:ro \
--network app_services_network \
--name data_access_server_proxy \
nginx:1.24.0