Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker/docker-compose.prod.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ services:
condition: service_started
volumes:
- static_volume:/usr/src/app/static
- media_volume:/usr/src/app/media
- ../../media:/usr/src/app/media
proxy:
container_name: tekdb_proxy
build:
context: ../proxy/
dockerfile: ../proxy/Dockerfile.local
Expand All @@ -33,7 +34,7 @@ services:
- "80:8080"
volumes:
- static_volume:/vol/static/static:ro
- media_volume:/vol/static/media:ro
- ../../media:/vol/static/media:ro
redis:
extends:
file: common.yaml
Expand All @@ -56,4 +57,3 @@ services:
volumes:
tekdb_db_data:
static_volume:
media_volume:
14 changes: 11 additions & 3 deletions scripts/Linux/install-docker-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ sudo usermod -aG docker ubuntu
echo "Installing git..."
sudo apt install git -y

echo "Creating TEKDB directory and cloning repository..."
mkdir tekdb
echo "Creating TEKDB directory"
mkdir -p tekdb
cd tekdb

echo "Creating a media directory for TEKDB..."
mkdir -p media

echo "Cloning the TEKDB repository..."
git clone https://github.com/Ecotrust/TEKDB.git

echo "Checking out the main branch..."
Expand All @@ -68,11 +73,14 @@ mv $ENV_FILE docker/.env.prod
echo "Pulling the latest Docker image..."
docker pull ghcr.io/ecotrust/tekdb/web:latest

echo "Building the proxy image..."
docker compose --env-file docker/.env.prod -f docker/docker-compose.prod.local.yaml build proxy

echo "Starting the Docker containers..."
docker compose --env-file docker/.env.prod -f docker/docker-compose.prod.local.yaml up -d

echo "Verifying that the containers are running..."
if [ "$(docker container inspect -f '{{.State.Status}}' "tekdb_web" 2>/dev/null)" = "running" ]; then
if [ "$(docker container inspect -f '{{.State.Status}}' "tekdb_web" 2>/dev/null)" = "running" ] && [ "$(docker container inspect -f '{{.State.Status}}' "db" 2>/dev/null)" = "running" ] && [ "$(docker container inspect -f '{{.State.Status}}' "tekdb_proxy" 2>/dev/null)" = "running" ]; then
echo "TEKDB containers are running successfully."
else
echo "Failed to start TEKDB containers. Please check the Docker logs for more information."
Comment on lines 82 to 86

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree w/ Copilot here - that extra ; after the then breaks the syntax.

A: I don't think this runs (I can't run other local scripts with this syntax)
B: If it did run, I think the clause would be ended, the 'true' result would always run, and the 'false' result would never run (if bash didn't choke on interpreting else as a standalone commaned)

Expand Down