Skip to content

Commit

Permalink
refactor: rename backend to rearwing
Browse files Browse the repository at this point in the history
  • Loading branch information
borolepratik committed Apr 19, 2024
1 parent 3843b6a commit 4501c91
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
type=semver,pattern={{version}},value=${{ github.ref == 'refs/heads/main' && env.VERSION || format('{0}-{1}', env.VERSION, github.ref_name) }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.description=Slick Telemetry backend ${{ env.BUILD_NAME }} image
org.opencontainers.image.description=Slick Telemetry rearwing ${{ env.BUILD_NAME }} image
org.opencontainers.image.version=${{ env.VERSION }}
# Build and upload Docker image to GHCR with Buildx
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![CodeQL](https://github.com/Slick-Telemetry/backend/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Slick-Telemetry/backend/actions/workflows/codeql.yml)
[![CodeQL](https://github.com/Slick-Telemetry/rearwing/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Slick-Telemetry/rearwing/actions/workflows/codeql.yml)

# backend <!-- omit from toc -->
# rearwing <!-- omit from toc -->

Slick Telemetry backend written in python with fastf1.

Expand Down Expand Up @@ -111,11 +111,11 @@ In `/docker`, create a copy of `.env.example` as `.env`.

- Build image
```sh
docker build --file Dockerfile.dev --tag backend-dev .
docker build --file Dockerfile.dev --tag rearwing-dev .
```
- Run container
```sh
docker run --name backend-dev --publish 8081:8081 backend-dev --detach
docker run --name rearwing-dev --publish 8081:8081 rearwing-dev --detach
```
- Open your browser at [`http://localhost:8081`](http://localhost:8081).

Expand Down
10 changes: 0 additions & 10 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import newrelic.agent # isort:skip


# Built-in
import os


if os.getenv("ENVIRONMENT") != "TEST":
newrelic.agent.initialize("newrelic.ini")

# External
import fastf1
from dotenv import dotenv_values
Expand Down
8 changes: 8 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import newrelic.agent # isort:skip


# Built-in
import os


if os.getenv("ENVIRONMENT") != "TEST":
newrelic.agent.initialize("newrelic.ini")


# Built-in
import json
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion docker/compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include:
- supabase-selfhost.yaml
services:
app:
container_name: backend-dev
container_name: rearwing-dev
build:
context: ..
dockerfile: Dockerfile.dev
Expand Down
2 changes: 1 addition & 1 deletion process.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
apps: [
{
name: "slick_telemetry_backend",
name: "slick_telemetry_rearwing",
script: "uvicorn",
interpreter: "./.venv/bin/python",
args: "app.main:app --host 0.0.0.0 --port 8081",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

#-->> Metadata <<------------------------------------------
[tool.poetry]
name = "backend"
name = "rearwing"
version = "0.6.0"
description = "Slick Telemetry backend written in python with fastapi"
authors = ["Slick Telemetry <[email protected]>"]
Expand Down
16 changes: 8 additions & 8 deletions useful_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,29 @@ docker ps
#### Build the images

```sh
docker build --file Dockerfile.dev --tag backend-dev .
docker build --file Dockerfile.prod --tag backend-prod .
docker build --file Dockerfile.dev --tag rearwing-dev .
docker build --file Dockerfile.prod --tag rearwing-prod .
```

#### Start the containers

```sh
docker run --name backend-dev --publish 8081:8081 backend-dev --detach
docker run --name backend-prod --publish 80:80 backend-prod --detach
docker run --name rearwing-dev --publish 8081:8081 rearwing-dev --detach
docker run --name rearwing-prod --publish 80:80 rearwing-prod --detach
```

#### Stop the containers

```sh
docker stop backend-dev
docker stop backend-prod
docker stop rearwing-dev
docker stop rearwing-prod
```

#### Restart the containers

```sh
docker restart backend-dev
docker restart backend-prod
docker restart rearwing-dev
docker restart rearwing-prod
```

### Compose
Expand Down

0 comments on commit 4501c91

Please sign in to comment.