-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_without_seed
32 lines (24 loc) · 1.11 KB
/
deploy_without_seed
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
#!/bin/bash
# Remove previous deployment
rm -rf kunstgraph
docker compose down
# Clone from main
git clone [email protected]:bp2023-fn1/kunstgraph.git
# The backend requires the combined schema file
# Copy the combined schema file to the backend
cp ./kunstgraph/ontology/dist/combined_schema.ttl ./kunstgraph/backend/combined_schema.ttl
# Build backend container
docker build -t fastapi ./kunstgraph/backend
# Remove temporary copy of schema file
rm kunstgraph/backend/combined_schema.ttl
# Create a temporary backend container instance to let the frontend fetch the OpenAPI schema and generate the API client
docker run -d --name setup_fetch_openapi -e NEO4J_URI="bolt://localhost" -e NEO4J_USERNAME="" -e NEO4J_PASSWORD="" -p "8000:8000" fastapi:latest
# Build frontend container
docker build -t nextjs --network=host ./kunstgraph/frontend
# Remove temporary backend container instance
docker stop setup_fetch_openapi
docker rm setup_fetch_openapi
# Launch the containers in a detached session
screen -d -m docker compose up
echo
echo Deployment complete. Containers are starting up now. To see status information, type screen -r