1
0
mirror of https://github.com/daniviga/bite.git synced 2025-04-20 14:31:20 +02:00

Merge b4b6294aa7b9a8dd30f98f95507331ee167d0152 into b73edba1a626dfdd69bb3ba11613de35510f06ee

This commit is contained in:
Daniele Viganò 2023-09-09 11:08:41 +00:00 committed by GitHub
commit e18a2d395f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 11 deletions

View File

@ -11,12 +11,12 @@ before_install:
_iot-simulator: &iot-simulator _iot-simulator: &iot-simulator
stage: simulator stage: simulator
install: install:
- docker-compose -f docker/docker-compose.yml pull - docker-compose -f docker/docker-compose.yml pull -q
- docker-compose -f docker/docker-compose.yml build - docker-compose -f docker/docker-compose.yml build
before_script: before_script:
- docker-compose -f docker/docker-compose.yml -f docker/edge/docker-compose.edge.yml up -d - docker-compose -f docker/docker-compose.yml -f docker/edge/docker-compose.edge.yml up -d
- sleep 30 # warm-up - sleep 30 # warm-up
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml pull - DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml pull -q
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml build - DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml build
script: script:
- sleep 5 # warm-up - sleep 5 # warm-up
@ -37,7 +37,7 @@ jobs:
if: branch = master if: branch = master
- stage: django - stage: django
install: install:
- docker-compose -f docker/docker-compose.yml pull - docker-compose -f docker/docker-compose.yml pull -q
- docker-compose -f docker/docker-compose.yml build - docker-compose -f docker/docker-compose.yml build
before_script: before_script:
- docker-compose -f docker/docker-compose.yml up -d - docker-compose -f docker/docker-compose.yml up -d

View File

@ -19,13 +19,39 @@ production.
### Requirements ### Requirements
- `docker-ce` or `moby` - `moby-engine` or `podman-docker` (recommended)
- `docker-compose` - `docker-compose`
The project is compatible with Docker for Windows (using Linux executors), The project is compatible with Docker for Windows (using Linux executors),
but it is advised to directly use a minimal Linux VM instead but it is advised to directly use a minimal Linux VM instead
(via the preferred hypervisor). (via the preferred hypervisor).
### Podman
`podman`, with `podman-docker` is the recommended way to run BITE, in rootless mode.
Requirements are:
- `podman`
- `podman-docker`
- `catatonit`
- `docker-compose`
On Fedora 33+:
```bash
sudo dnf install -y podman podman-docker catatonit docker-compose
```
To setup `podman` run:
```bash
systemctl start --user podman.socket
export DOCKER_HOST=unix://run/user/$UID/podman/podman.sock
```
### Application stack
The application stack is composed by the following components: The application stack is composed by the following components:
- [Django](https://www.djangoproject.com/) with - [Django](https://www.djangoproject.com/) with

View File

@ -39,11 +39,11 @@ services:
networks: networks:
- net - net
ports: ports:
- "${CUSTOM_DOCKER_IP:-0.0.0.0}:123:123/udp" - "${CUSTOM_DOCKER_IP:-0.0.0.0}:1230:123/udp" # PORT 123 CAN BE USED WHEN RUNNING AS PRIVILEGED USER
timescale: timescale:
<<: *service_default <<: *service_default
image: timescale/timescaledb:latest-pg12 image: timescale/timescaledb:latest-pg14
environment: environment:
POSTGRES_USER: "bite" POSTGRES_USER: "bite"
POSTGRES_PASSWORD: "password" POSTGRES_PASSWORD: "password"
@ -90,12 +90,12 @@ services:
environment: environment:
NGINX_ENTRYPOINT_QUIET_LOGS: 1 NGINX_ENTRYPOINT_QUIET_LOGS: 1
ports: ports:
- "${CUSTOM_DOCKER_IP:-0.0.0.0}:80:80" - "${CUSTOM_DOCKER_IP:-0.0.0.0}:8080:80" # PORT 80 CAN BE USED WHEN RUNNING AS PRIVILEGED USER
networks: networks:
- net - net
volumes: volumes:
- staticdata:/srv/appdata/bite/static - "staticdata:/srv/appdata/bite/static:U" # REMOVE ':U' ON MOBY/DOCKER
- ./ingress/nginx.conf:/etc/nginx/nginx.conf - "./ingress/nginx.conf:/etc/nginx/nginx.conf"
bite: bite:
@ -123,7 +123,7 @@ services:
static-files: static-files:
image: daniviga/bite image: daniviga/bite
volumes: volumes:
- staticdata:/srv/appdata/bite/static - "staticdata:/srv/appdata/bite/static:U" # REMOVE ':U' ON MOBY/DOCKER
command: ["python3", "manage.py", "collectstatic", "--noinput"] command: ["python3", "manage.py", "collectstatic", "--noinput"]
dispatcher: dispatcher:

View File

@ -24,7 +24,7 @@ services:
image: docker:dind image: docker:dind
privileged: true privileged: true
environment: environment:
DOCKER_TLS_CERTDIR: DOCKER_TLS_CERTDIR: ""
networks: networks:
- net - net
ports: ports: