# New Hosting Script

```dockercompose
  nano docker-compose.yml
```

```dockercompose
version: '3'
services:
  doltdb:
    image: dolthub/dolt-sql-server:latest
    command:
      -l debug
    volumes:
      - doltdb-data:/var/lib/dolt
      - doltdb-root:/.dolt
      - doltdb-configs:/etc/dolt
      - ./init-dolt.sh:/docker-entrypoint-initdb.d/init-dolt.sh
    ports:
      - "3306:3306"
    networks:
      - default
    restart: always  # Add this line
  webserver:
    build: .
    command: ["/bin/bash", "-c", "source /app/venv/bin/activate && flask run -h 0.0.0.0"]  
    ports:
      - "5000:5000"
    networks:
      - default  
    restart: always  # Add this line
networks:
  default:
    external:
      name: my-network
volumes:
  doltdb-data: {}
  doltdb-root: {}
  doltdb-configs: {}
```

```dockerfile
nano Dockerfile
```

```dockerfile
# Use a base image with Ubuntu
FROM ubuntu:latest

# Set non-interactive mode
ENV DEBIAN_FRONTEND=noninteractive

# Update package sources and install necessary packages
RUN apt-get update && apt-get install -y \
    git \
    python3 \
    python3-venv \
    curl \
    lsof \
    wget \
    npm \
    supervisor \
    && rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y supervisor \
    && rm -rf /var/lib/apt/lists/*

# Clone repositories
RUN git clone https://gitlab.com/DevanshuBrahmbhatt/qubic-data-storage.git /app/qubic-data-storage 

# Install required Python packages
RUN python3 -m venv /app/venv \
    && /app/venv/bin/pip3 install -r /app/qubic-data-storage/requirements.txt 

# Set working directory for frontend
WORKDIR /app/qubic-data-storage/qubic-data-storage-frontend

# Install Node.js using NVM
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
    && . ~/.nvm/nvm.sh \
    && nvm install 14 \
    && nvm use 14 \
    && npm install -g yarn


RUN ls -la

ENV PATH="/usr/bin/versions/node/v14.21.3/bin:${PATH}"

# Build and run Vue.js frontend
RUN yarn install 
RUN yarn build

# Expose the necessary ports
EXPOSE 5000

# Set working directory to qubic-data-storage
WORKDIR /app/qubic-data-storage

# Copy supervisor configuration
#COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Start processes
#CMD ["/usr/bin/supervisord"]

CMD ["/bin/bash", "-c", "source /app/venv/bin/activate && flask run -h 0.0.0.0"]

```

```shellscript
nano init-dolt.sh
```

```shellscript
dolt config --global --add user.email doltServer@company.com 
dolt config --global --add user.name "Dolt Server Account"
dolt sql -q "CREATE DATABASE calibration"
```

<pre><code>sudo apt-get update
sudo apt-get install docker.io
sudo apt-get install docker-compose
sudo docker-compose build
<strong>sudo docker network create my-network
</strong><strong>sudo docker-compose up -d
</strong><strong>sudo docker run --network my-network -it mysql:latest mysql -u root --host doltdb --port 3306 -p #####
</strong>
</code></pre>

### Jupyter Notebook

```properties
git clone https://gitlab.com/DevanshuBrahmbhatt/qubic-jupyter.git
source notebook_env/bin/activate
pip install .
pip install notebook
# export PATH=$PATH:/home/usr/.local/bin
jupyter notebook
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devanshus-organization.gitbook.io/qubic-docs/new-hosting-script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
