|
1 | 1 | # Run LibreBooking with Podman |
2 | 2 |
|
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) |
9 | 4 |
|
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: |
12 | 7 |
|
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 |
14 | 10 |
|
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 |
19 | 14 |
|
20 | 15 | ```sh |
21 | 16 | podman network create librebooking |
| 17 | +``` |
22 | 18 |
|
23 | | -podman run --name mariadb-lb \ |
| 19 | +Start the containers |
| 20 | + |
| 21 | +```sh |
| 22 | +podman container run \ |
| 23 | + --name librebooking-db \ |
24 | 24 | --detach \ |
25 | 25 | --replace \ |
26 | 26 | --network librebooking \ |
27 | 27 | --hostname db \ |
| 28 | + --volume librebooking-db_conf:/config:U \ |
28 | 29 | --env-file db.env \ |
29 | | - -v db-conf:/config:U \ |
30 | | - -p 3306:3306 \ |
31 | 30 | docker.io/linuxserver/mariadb:10.6.13 |
32 | 31 |
|
33 | | -podman run --name lb \ |
| 32 | +podman run \ |
| 33 | + --name librebooking-app \ |
34 | 34 | --detach \ |
35 | 35 | --replace \ |
36 | | - --hostname librebooking \ |
37 | 36 | --network librebooking \ |
| 37 | + --publish 8080:8080 \ |
| 38 | + --volume librebooking-app_conf:/config:U \ |
38 | 39 | --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 \ |
43 | 40 | docker.io/librebooking/librebooking:develop |
44 | 41 | ``` |
45 | 42 |
|
46 | | -# Production way with systemd |
| 43 | +## Using systemd: local access (production) |
47 | 44 |
|
48 | 45 | This method persists over reboots. |
49 | 46 | [Automatic updates](https://docs.podman.io/en/latest/markdown/podman-auto-update.1.html) |
|
0 commit comments