Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aadarshlalchandani/aasetpy

Your go-to Python Project basic setup with just one command!
https://github.com/aadarshlalchandani/aasetpy

bash-script docker docker-compose git pip python setup uv

Last synced: 1 day ago
JSON representation

Your go-to Python Project basic setup with just one command!

Awesome Lists containing this project

README

        

# your_project_name

## Setup the Virtual Environment

Open terminal in `your_project_name` directory

You can run this command by following instructions [here](https://gist.github.com/aadarshlalchandani/b737e77a480a70a4755267dd81f82a68?permalink_comment_id=5315260#gistcomment-5315260).

```bash
aasetpy
```

## Run your python scripts

```bash
./run.sh python_filename
```
The File Logs will be stored in `logs/python_filename_logs.log`.


Containerization of the your_project_name

### Containerize and Start the Project inside container

```bash
sudo docker-compose up --build -d
```

### Access the real time project logs

```bash
sudo docker exec -it DOCKER_IMAGE_NAME tail -f logs/main_logs.log
```

### Access all logs in the docker container with filename

```bash
sudo docker exec -it DOCKER_IMAGE_NAME sh -c 'for file in logs/*.log; do echo "File: $file"; cat "$file"; echo -en "\n\n"; done'
```

### Access Docker Container

```bash
sudo docker ps --filter name=DOCKER_IMAGE_NAME
```

### Stop the API Docker Container

```bash
sudo docker stop $(sudo docker ps -aq --filter name=DOCKER_IMAGE_NAME)
```