Skip to content

Commit c0caf05

Browse files
authored
package and docker images renamed (#22)
1 parent 71ca621 commit c0caf05

File tree

11 files changed

+147
-68
lines changed

11 files changed

+147
-68
lines changed

.github/workflows/docker_push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
strategy:
1919
matrix:
2020
include:
21-
- image_name: api-template-app
21+
- image_name: fastapi-template-api
2222
dockerfile: ./docker/Dockerfile
2323
context: .
24-
- image_name: api-workers-general
24+
- image_name: fastapi-template-api-workers-general
2525
dockerfile: ./api-workers-general/Dockerfile
2626
context: ./api-workers-general
27-
- image_name: api-workers-ml
27+
- image_name: fastapi-template-api-workers-ml
2828
dockerfile: ./api-workers-ml/Dockerfile
2929
context: ./api-workers-ml
3030

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to `api-template`
1+
# Contributing to `fastapi-template`
22

33
Contributions are welcome, and they are greatly appreciated!
44
Every little bit helps, and credit will always be given.
@@ -9,7 +9,7 @@ You can contribute in many ways:
99

1010
## Report Bugs
1111

12-
Report bugs at https://github.com/ilkersigirci/api-template/issues
12+
Report bugs at https://github.com/ilkersigirci/fastapi-template/issues
1313

1414
If you are reporting a bug, please include:
1515

@@ -29,11 +29,11 @@ Anything tagged with "enhancement" and "help wanted" is open to whoever wants to
2929

3030
## Write Documentation
3131

32-
api-template could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
32+
fastapi-template could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
3333

3434
## Submit Feedback
3535

36-
The best way to send feedback is to file an issue at https://github.com/ilkersigirci/api-template/issues.
36+
The best way to send feedback is to file an issue at https://github.com/ilkersigirci/fastapi-template/issues.
3737

3838
If you are proposing a new feature:
3939

@@ -44,22 +44,22 @@ If you are proposing a new feature:
4444

4545
# Get Started!
4646

47-
Ready to contribute? Here's how to set up `api-template` for local development.
47+
Ready to contribute? Here's how to set up `fastapi-template` for local development.
4848
Please note this documentation assumes you already have `uv` and `Git` installed and ready to go.
4949

50-
1. Fork the `api-template` repo on GitHub.
50+
1. Fork the `fastapi-template` repo on GitHub.
5151

5252
2. Clone your fork locally:
5353

5454
```bash
5555
cd <directory_in_which_repo_should_be_created>
56-
git clone git@github.com:YOUR_NAME/api-template.git
56+
git clone git@github.com:YOUR_NAME/fastapi-template.git
5757
```
5858

5959
3. Now we need to install the environment. Navigate into the directory
6060

6161
```bash
62-
cd api-template
62+
cd fastapi-template
6363
```
6464

6565
Then, install and activate the environment with:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# chain commands together with semicolon
33
.ONESHELL:
44
SHELL=/bin/bash
5-
ROOT_DIR=api-template
5+
ROOT_DIR=fastapi-template
66
PACKAGE=app
77
DOC_DIR=./docs
88
TEST_DIR=./tests
99
TEST_MARKER=placeholder
1010
TEST_OUTPUT_DIR=tests_outputs
1111
PRECOMMIT_FILE_PATHS=./app/__init__.py
1212
PROFILE_FILE_PATH=./app/__init__.py
13-
DOCKER_IMAGE=api-template
13+
DOCKER_IMAGE=fastapi-template
1414
DOCKER_TARGET=development
1515

1616

@@ -161,7 +161,7 @@ reset-all-migrations: ## Reset all migrations
161161
uv run --module alembic downgrade base
162162

163163
run-docker-services: # Run required docker services
164-
docker compose up -d api-template-app api-workers-general api-workers-ml
164+
docker compose up -d fastapi-template-app api-workers-general api-workers-ml
165165

166166
##### EXTERNAL MAKEFILE CALLS #####
167167

api-shared/src/api_shared/core/telemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def setup_opentelemetry_worker(settings):
6363

6464
resource = Resource(
6565
attributes={
66-
SERVICE_NAME: getattr(settings, "PROJECT_NAME", "api-template-worker"),
66+
SERVICE_NAME: getattr(settings, "PROJECT_NAME", "fastapi-template-worker"),
6767
TELEMETRY_SDK_LANGUAGE: "python",
6868
DEPLOYMENT_ENVIRONMENT: settings.ENVIRONMENT,
6969
},

api-workers-general/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainers = [
1313
]
1414

1515
keywords = [
16-
"api-template-worker"
16+
"fastapi-template-worker"
1717
]
1818

1919
classifiers = [

api-workers-ml/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainers = [
1313
]
1414

1515
keywords = [
16-
"api-template-worker"
16+
"fastapi-template-worker"
1717
]
1818

1919
classifiers = [

docker-compose.dev.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: fastapi-template
2+
3+
networks:
4+
fastapi-template-network:
5+
name: fastapi-template-network
6+
driver: bridge
7+
ipam:
8+
config:
9+
- subnet: 192.168.10.0/24
10+
11+
x-deploy: &gpu-deploy
12+
deploy:
13+
resources:
14+
reservations:
15+
devices:
16+
- driver: nvidia
17+
count: all
18+
capabilities: [gpu]
19+
20+
services:
21+
fastapi-template-api:
22+
image: fastapi-template-api:latest
23+
container_name: fastapi-template-api
24+
build:
25+
context: .
26+
dockerfile: docker/Dockerfile
27+
# target: development
28+
target: production
29+
networks:
30+
- fastapi-template-network
31+
ports:
32+
- 8000:8000
33+
restart: "no"
34+
security_opt:
35+
- no-new-privileges:true
36+
tty: true
37+
command: ["python", "-m", "app.__main__"]
38+
env_file:
39+
- .env
40+
environment:
41+
- PORT=8000
42+
- RELOAD=False
43+
# For self-hosted Hatchet, use:
44+
# depends_on:
45+
# hatchet-lite:
46+
# condition: service_started
47+
48+
fastapi-template-api-workers-general:
49+
image: fastapi-template-api-workers-general:latest
50+
container_name: fastapi-template-api-workers-general
51+
build:
52+
context: api-workers-general
53+
dockerfile: Dockerfile
54+
# target: development
55+
target: production
56+
additional_contexts:
57+
api-shared: api-shared
58+
networks:
59+
- fastapi-template-network
60+
restart: "no"
61+
security_opt:
62+
- no-new-privileges:true
63+
tty: true
64+
command: ["python", "-m", "worker.main"]
65+
env_file:
66+
- .env
67+
environment:
68+
- HATCHET_WORKER_NAME=fastapi-template-api-workers-general
69+
- HATCHET_WORKER_SLOTS=${WORKER_COUNT:-5}
70+
# For self-hosted Hatchet, use:
71+
# depends_on:
72+
# hatchet-lite:
73+
# condition: service_started
74+
75+
fastapi-template-api-workers-ml:
76+
image: fastapi-template-api-workers-ml:latest
77+
container_name: fastapi-template-api-workers-ml
78+
build:
79+
context: api-workers-ml
80+
dockerfile: Dockerfile
81+
# target: development
82+
target: production
83+
additional_contexts:
84+
api-shared: api-shared
85+
networks:
86+
- fastapi-template-network
87+
restart: "no"
88+
security_opt:
89+
- no-new-privileges:true
90+
<<: *gpu-deploy
91+
tty: true
92+
command: ["python", "-m", "worker.main"]
93+
env_file:
94+
- .env
95+
environment:
96+
- HATCHET_WORKER_NAME=fastapi-template-api-workers-ml
97+
- HATCHET_WORKER_SLOTS=${ML_WORKER_COUNT:-3}
98+
# For self-hosted Hatchet, use:
99+
# depends_on:
100+
# hatchet-lite:
101+
# condition: service_started

docker-compose.hatchet.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: api-template
1+
name: fastapi-template
22

33
networks:
4-
api-template-network:
5-
name: api-template-network
4+
fastapi-template-network:
5+
name: fastapi-template-network
66
driver: bridge
77
ipam:
88
config:
@@ -24,7 +24,7 @@ services:
2424
POSTGRES_PASSWORD: postgres
2525
POSTGRES_DB: postgres
2626
networks:
27-
- api-template-network
27+
- fastapi-template-network
2828
expose:
2929
- "5432"
3030
volumes:
@@ -47,7 +47,7 @@ services:
4747
- programming
4848
- hatchet
4949
networks:
50-
- api-template-network
50+
- fastapi-template-network
5151
expose:
5252
- "8888" # HTTP UI
5353
- "7077" # gRPC API

docker-compose.otel.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: api-template
1+
name: fastapi-template
22

33
networks:
4-
api-template-network:
5-
name: api-template-network
4+
fastapi-template-network:
5+
name: fastapi-template-network
66
driver: bridge
77
ipam:
88
config:
@@ -16,7 +16,7 @@ services:
1616
image: otel/opentelemetry-collector-contrib:0.53.0
1717
container_name: otel-collector
1818
networks:
19-
- api-template-network
19+
- fastapi-template-network
2020
ports:
2121
- "4317:4317"
2222
volumes:
@@ -27,7 +27,7 @@ services:
2727
image: jaegertracing/all-in-one:1.35
2828
hostname: jaeger
2929
networks:
30-
- api-template-network
30+
- fastapi-template-network
3131
ports:
3232
- 16686:16686
3333

@@ -36,7 +36,7 @@ services:
3636
image: docker.io/grafana/otel-lgtm:latest
3737
container_name: grafana-lgtm
3838
networks:
39-
- api-template-network
39+
- fastapi-template-network
4040
ports:
4141
- 3000:3000 # Grafana
4242
- 4317:4317 # gRPC

docker-compose.yml

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: api-template
1+
name: fastapi-template
22

33
networks:
4-
api-template-network:
5-
name: api-template-network
4+
fastapi-template-network:
5+
name: fastapi-template-network
66
driver: bridge
77
ipam:
88
config:
@@ -18,17 +18,11 @@ x-deploy: &gpu-deploy
1818
capabilities: [gpu]
1919

2020
services:
21-
api-template-app:
22-
# image: ghcr.io/ilkersigirci/api-template-app:latest
23-
image: api-template-app:latest
24-
container_name: api-template-app
25-
build:
26-
context: .
27-
dockerfile: docker/Dockerfile
28-
# target: development
29-
target: production
21+
fastapi-template-api:
22+
image: ghcr.io/ilkersigirci/fastapi-template-api:latest
23+
container_name: fastapi-template-api
3024
networks:
31-
- api-template-network
25+
- fastapi-template-network
3226
ports:
3327
- 8000:8000
3428
restart: "no"
@@ -46,19 +40,11 @@ services:
4640
# hatchet-lite:
4741
# condition: service_started
4842

49-
api-workers-general:
50-
# image: ghcr.io/ilkersigirci/api-workers-general:latest
51-
image: api-workers-general:latest
52-
container_name: api-workers-general
53-
build:
54-
context: api-workers-general
55-
dockerfile: Dockerfile
56-
# target: development
57-
target: production
58-
additional_contexts:
59-
api-shared: api-shared
43+
fastapi-template-api-workers-general:
44+
image: ghcr.io/ilkersigirci/fastapi-template-api-workers-general:latest
45+
container_name: fastapi-template-api-workers-general
6046
networks:
61-
- api-template-network
47+
- fastapi-template-network
6248
restart: "no"
6349
security_opt:
6450
- no-new-privileges:true
@@ -67,26 +53,18 @@ services:
6753
env_file:
6854
- .env
6955
environment:
70-
- HATCHET_WORKER_NAME=general-worker
56+
- HATCHET_WORKER_NAME=fastapi-template-api-workers-general
7157
- HATCHET_WORKER_SLOTS=${WORKER_COUNT:-5}
7258
# For self-hosted Hatchet, use:
7359
# depends_on:
7460
# hatchet-lite:
7561
# condition: service_started
7662

77-
api-workers-ml:
78-
# image: ghcr.io/ilkersigirci/api-workers-ml:latest
79-
image: api-workers-ml:latest
80-
container_name: api-workers-ml
81-
build:
82-
context: api-workers-ml
83-
dockerfile: Dockerfile
84-
# target: development
85-
target: production
86-
additional_contexts:
87-
api-shared: api-shared
63+
fastapi-template-api-workers-ml:
64+
image: ghcr.io/ilkersigirci/fastapi-template-api-workers-ml:latest
65+
container_name: fastapi-template-api-workers-ml
8866
networks:
89-
- api-template-network
67+
- fastapi-template-network
9068
restart: "no"
9169
security_opt:
9270
- no-new-privileges:true
@@ -96,7 +74,7 @@ services:
9674
env_file:
9775
- .env
9876
environment:
99-
- HATCHET_WORKER_NAME=ml-worker
77+
- HATCHET_WORKER_NAME=fastapi-template-api-workers-ml
10078
- HATCHET_WORKER_SLOTS=${ML_WORKER_COUNT:-3}
10179
# For self-hosted Hatchet, use:
10280
# depends_on:

0 commit comments

Comments
 (0)