Skip to content

Commit 50ccaf9

Browse files
Robin Alexanderikke-t
authored andcommitted
Align docker and podman cli examples
1 parent 387d052 commit 50ccaf9

2 files changed

Lines changed: 33 additions & 36 deletions

File tree

.examples/docker/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Run librebooking with docker
22

3-
## Using the command line: local access
3+
## Using the command line: local access (testing)
44

55
This setup is meant for accessing the application from your local network.
66
It features:
77

88
* A librebooking container reachable at <http://localhost:8080>
9-
* A docker volume storing the configuration files
9+
* A persistent storage for the database and librebooking configuration files
1010

1111
Adapt files `db.env`and `lb.env` to your needs
1212

13-
Create a docker network
13+
Create a container network
1414

1515
```sh
1616
docker network create librebooking
@@ -19,32 +19,32 @@ docker network create librebooking
1919
Start the containers
2020

2121
```sh
22-
docker run \
23-
--detach \
22+
docker container run \
2423
--name librebooking-db \
24+
--detach \
2525
--network librebooking \
2626
--hostname db
27-
--volume librebooking-db:/config \
27+
--volume librebooking-db_conf:/config \
2828
--env-file db.env \
29-
linuxserver/mariadb:10.6.13
29+
docker.io/linuxserver/mariadb:10.6.13
3030

3131
docker run \
32-
--detach \
3332
--name librebooking-app \
33+
--detach \
3434
--network librebooking \
3535
--publish 8080:8080 \
36-
--volume librebooking-conf:/config \
36+
--volume librebooking-app_conf:/config \
3737
--env-file lb.env \
38-
librebooking/librebooking:4.1.0
38+
docker.io/librebooking/librebooking:4.1.0
3939
```
4040

41-
## Using docker compose: local access
41+
## Using docker compose: local access (testing)
4242

4343
This setup is meant for accessing the application from your local network.
4444
It features:
4545

4646
* A librebooking container reachable at <http://localhost:8080>
47-
* A docker volume storing the configuration files
47+
* A persistent storage for the database and librebooking configuration files
4848
* A librebooking container used to run cron jobs
4949

5050
Adapt files `db.env`and `lb.env` to your needs
@@ -55,7 +55,7 @@ Start the application
5555
docker compose --file docker-compose-local.yml up --detach
5656
```
5757

58-
## Using docker compose: public access
58+
## Using docker compose: public access (production)
5959

6060
This setup is meant for accessing the application from the internet.
6161
It features:

.examples/podman/README.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,46 @@
11
# Run LibreBooking with Podman
22

3-
This is an example how to run LibreBooking under podman container management.
4-
Below examples show both the quick way for running it directly with [podman
5-
run](https://docs.podman.io/en/latest/markdown/podman-run.1.html) command and
6-
the more permanent way
7-
[using systemd](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html)
8-
which persists across reboots and is good for production.
3+
## Using the command line: local access (testing)
94

10-
Both of the setups create private network for libreboot, and persistent storage
11-
for the congigs.
5+
This setup is meant for accessing the application from your local network.
6+
It features:
127

13-
# Podman Run for dev and testing
8+
* A librebooking container reachable at <http://localhost:8080>
9+
* A persistent storage for the database and librebooking configuration files
1410

15-
Change the variables to your liking, and run the podman commands. If you want
16-
to do it just quicker, network is not necessary and volumes can be just given
17-
as local directories using `-v ~/dir:/path/in/container:z` instead of the first
18-
four commands.
11+
Adapt files `db.env`and `lb.env` to your needs
12+
13+
Create a container network
1914

2015
```sh
2116
podman network create librebooking
17+
```
2218

23-
podman run --name mariadb-lb \
19+
Start the containers
20+
21+
```sh
22+
podman container run \
23+
--name librebooking-db \
2424
--detach \
2525
--replace \
2626
--network librebooking \
2727
--hostname db \
28+
--volume librebooking-db_conf:/config:U \
2829
--env-file db.env \
29-
-v db-conf:/config:U \
30-
-p 3306:3306 \
3130
docker.io/linuxserver/mariadb:10.6.13
3231

33-
podman run --name lb \
32+
podman run \
33+
--name librebooking-app \
3434
--detach \
3535
--replace \
36-
--hostname librebooking \
3736
--network librebooking \
37+
--publish 8080:8080 \
38+
--volume librebooking-app_conf:/config:U \
3839
--env-file lb.env \
39-
-p 8080:8080 \
40-
--volume lb-images.volume:/var/www/html/Web/uploads/images \
41-
--volume lb-reservation.volume:/var/www/html/Web/uploads/reservation \
42-
--volume ~/librebooking-conf:/config:U \
4340
docker.io/librebooking/librebooking:develop
4441
```
4542

46-
# Production way with systemd
43+
## Using systemd: local access (production)
4744

4845
This method persists over reboots.
4946
[Automatic updates](https://docs.podman.io/en/latest/markdown/podman-auto-update.1.html)

0 commit comments

Comments
 (0)