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
stage: simulator
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
before_script:
- docker-compose -f docker/docker-compose.yml -f docker/edge/docker-compose.edge.yml up -d
- 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
script:
- sleep 5 # warm-up
@ -37,7 +37,7 @@ jobs:
if: branch = master
- stage: django
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
before_script:
- docker-compose -f docker/docker-compose.yml up -d

View File

@ -19,13 +19,39 @@ production.
### Requirements
- `docker-ce` or `moby`
- `moby-engine` or `podman-docker` (recommended)
- `docker-compose`
The project is compatible with Docker for Windows (using Linux executors),
but it is advised to directly use a minimal Linux VM instead
(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:
- [Django](https://www.djangoproject.com/) with

View File

@ -39,11 +39,11 @@ services:
networks:
- net
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:
<<: *service_default
image: timescale/timescaledb:latest-pg12
image: timescale/timescaledb:latest-pg14
environment:
POSTGRES_USER: "bite"
POSTGRES_PASSWORD: "password"
@ -90,12 +90,12 @@ services:
environment:
NGINX_ENTRYPOINT_QUIET_LOGS: 1
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:
- net
volumes:
- staticdata:/srv/appdata/bite/static
- ./ingress/nginx.conf:/etc/nginx/nginx.conf
- "staticdata:/srv/appdata/bite/static:U" # REMOVE ':U' ON MOBY/DOCKER
- "./ingress/nginx.conf:/etc/nginx/nginx.conf"
bite:
@ -123,7 +123,7 @@ services:
static-files:
image: daniviga/bite
volumes:
- staticdata:/srv/appdata/bite/static
- "staticdata:/srv/appdata/bite/static:U" # REMOVE ':U' ON MOBY/DOCKER
command: ["python3", "manage.py", "collectstatic", "--noinput"]
dispatcher:

View File

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