-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Exclude everything | ||
** | ||
|
||
# Project file | ||
!pyproject.toml | ||
!LICENSE | ||
|
||
# Migrations | ||
!src/migrations/*.py | ||
!src/migrations/versions | ||
!src/alembic.ini | ||
|
||
# Python application | ||
!src/traffcap/config | ||
!src/traffcap/core | ||
!src/traffcap/dto | ||
!src/traffcap/model | ||
!src/traffcap/repositories | ||
!src/traffcap/routes | ||
!src/traffcap/templates | ||
!src/traffcap/*.py | ||
|
||
# SPA | ||
!src/traffcap/spa/public | ||
!src/traffcap/spa | ||
!src/traffcap/spa/.npmrc | ||
!src/traffcap/spa/index.html | ||
!src/traffcap/spa/package.json | ||
!src/traffcap/spa/postcss.config.cjs | ||
!src/traffcap/spa/quasar.config.js | ||
!src/traffcap/spa/tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM python:3.8.18-alpine AS base_image | ||
|
||
ENV PATH=/root/.local/bin:$PATH \ | ||
TRAFFCAP_REQUESTS_PREFIX="r" \ | ||
TRAFFCAP_DB_USER="" \ | ||
TRAFFCAP_DB_PASSWORD="" \ | ||
TRAFFCAP_DB_HOST="" \ | ||
TRAFFCAP_DB_NAME="/data/traffcap.db" \ | ||
TRAFFCAP_DB_DRIVER="sqlite" \ | ||
TRAFFCAP_SERVER_URL="localhost:9669" \ | ||
PYTHONPATH="src/traffcap" | ||
|
||
EXPOSE 9669 | ||
|
||
RUN apk --no-cache add curl nodejs npm && \ | ||
mkdir /traffcap && \ | ||
mkdir /data | ||
|
||
COPY . /traffcap | ||
|
||
WORKDIR /traffcap | ||
|
||
# Install Python dependencies | ||
RUN curl -sSL https://pdm.fming.dev/install-pdm.py | python3 - && \ | ||
pdm install --production | ||
|
||
# Build frontend | ||
RUN cd src/traffcap/spa && \ | ||
npm install && \ | ||
npm run build | ||
|
||
WORKDIR /traffcap/src | ||
|
||
VOLUME /data | ||
|
||
CMD pdm run server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters