Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce support for Podman #26

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docker/edge/docker-compose.edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
image: docker:dind
privileged: true
environment:
DOCKER_TLS_CERTDIR:
DOCKER_TLS_CERTDIR: ""
networks:
- net
ports:
Expand Down