Skip to content

Commit e6c61eb

Browse files
committed
use container engine agnostic file names as it works with Docker and Podman
1 parent 93cb067 commit e6c61eb

File tree

7 files changed

+34
-21
lines changed

7 files changed

+34
-21
lines changed

Docker.md renamed to Container.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
LinuxFr on Docker
2-
-----------------
1+
LinuxFr with Containers
2+
-----------------------
33

44
To simplify set up of a developement environment, LinuxFr.org can be
5-
run on Docker with `docker-compose up`.
5+
run with a container engine like Docker or Podman with the [`compose.yml`](./compose.yaml)
6+
file which describe how to build all needed services.
67

7-
Note: you need to enable the Docker BuildKit builder. Either you have a Docker
8-
version which uses it by default, or you set the environment variable `export DOCKER_BUILDKIT=1`.
8+
If you use the Docker engine, you can use the `docker compose up` command to start the system (you
9+
need to install the [Docker compose plugin](https://docs.docker.com/compose/)).
10+
11+
> Note: with the Docker engine, you need to enable the Docker BuildKit builder.
12+
> Either you have a Docker version which uses it by default, or you set the
13+
> environment variable `export DOCKER_BUILDKIT=1`.
14+
15+
If you use Podman, you can either use the same Docker compose plugin or the
16+
[podman-compose](https://github.com/containers/podman-compose/)
17+
utility. The podman cli itself provide a wrapper of one of these two tools through the
18+
[`podman compose` command](https://docs.podman.io/en/latest/markdown/podman-compose.1.html).
19+
20+
At this point, the documentation will give you `docker compose` commands, but you should be able
21+
to use `podman compose` without any issue.
922

1023
To init the SQL database schema, you need to wait upto the `database`
1124
container to be ready to listen MySQL connections.
@@ -19,7 +32,7 @@ For example, you should see in the logs:
1932
Then, open a second terminal and run:
2033

2134
```
22-
docker-compose run linuxfr.org bin/rails db:setup
35+
docker compose run linuxfr.org bin/rails db:setup
2336
```
2437

2538
Finally, the environment is ready and you can open [http://dlfp.lo](http://dlfp.lo)
@@ -57,7 +70,7 @@ service.
5770

5871
If you want to change the application port and/or other configurations, you can
5972
[override](https://docs.docker.com/compose/extends/)
60-
the docker-compose configuration (in particular the `nginx` service for
73+
the docker compose configuration (in particular the `nginx` service for
6174
the port).
6275

6376
Notice, that if LinuxFr.org doesn't run on port 80, the image cache
@@ -66,8 +79,8 @@ service won't work well and so you won't be able to see images in the news.
6679
Test modifications
6780
==================
6881

69-
The docker-compose is currently configured to share `./app`, `./db` and
70-
`./public` directories with the docker container.
82+
The compose file currently shares `./app`, `./db` and
83+
`./public` directories with the container.
7184

7285
So you can update files with your prefered IDE on your machine. Rails
7386
will directly detect changes and apply them on next page reload.
@@ -76,7 +89,7 @@ Furthermore, if you need to access the Rails console, you need a second
7689
terminal and run:
7790

7891
```
79-
docker-compose run linuxfr.org bin/rails console
92+
docker compose run linuxfr.org bin/rails console
8093
```
8194

8295
Note: currently, we didn't configure rails to show directly the
@@ -93,10 +106,10 @@ To get help about writing tests, see the
93106
[Ruby on Rails documentation](https://guides.rubyonrails.org/testing.html#the-rails-test-runner)
94107
.
95108

96-
To run tests with Docker environment, you need to use this command:
109+
To run tests with containers, you need to use this command:
97110

98111
```
99-
docker-compose run linuxfr.org bin/rails test -v
112+
docker compose run linuxfr.org bin/rails test -v
100113
```
101114

102115
Inspect the database schema
@@ -116,20 +129,20 @@ In case you need to apply new database migrations, you need a second
116129
terminal and run:
117130

118131
```
119-
docker-compose run linuxfr.org bin/rails db:migrate
132+
docker compose run linuxfr.org bin/rails db:migrate
120133
```
121134

122135
If you had issue and want to reset all data in your database system,
123136
use:
124137

125138
```
126-
docker-compose run linuxfr.org bin/rails db:reset
139+
docker compose run linuxfr.org bin/rails db:reset
127140
```
128141

129-
Services provided by the docker-compose
142+
Services provided by the compose file
130143
=======================================
131144

132-
Currently, these services are directly enabled by docker-compose:
145+
Currently, these services are directly enabled by compose:
133146

134147
1. The [LinuxFr.org](https://github.com/linuxfrorg/linuxfr.org)
135148
ruby on rails application itself
@@ -146,7 +159,7 @@ For now, these services aren't available:
146159
because it requires to run
147160
LinuxFr.org with a TLS certificate. When the service will accept to
148161
fetch articles with simple `http://`, we'll be able to provide it
149-
directly with docker-compose.
162+
directly with docker compose.
150163
2. The [svgtex service](https://github.com/linuxfrorg/svgtex), because LinuxFr
151164
has hard-coded the `localhost`
152165
hostname in it's [HTML Pipeline tool](https://github.com/linuxfrorg/html-pipeline-linuxfr/blob/linuxfr/lib/html/pipeline/linuxfr.rb#L8)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Install
1212

1313
See [INSTALL.md](INSTALL.md) to set up LinuxFr.org on a Debian environment.
1414

15-
Alternatively, you can read [Docker.md](Docker.md) to setup easily
16-
LinuxFr.org development environment with the Docker engine and
17-
[docker-compose](https://docs.docker.com/compose/).
15+
Alternatively, you can read [Container.md](Container.md) to setup easily
16+
LinuxFr.org development environment with a container engine like Docker or
17+
Podman and use the [container composer](https://docs.docker.com/compose/).
1818

1919
See also
2020
--------

docker-compose.yaml renamed to compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
linuxfr.org:
55
build:
66
context: .
7-
dockerfile: deployment/linuxfr.org/Dockerfile
7+
dockerfile: deployment/linuxfr.org/Containerfile
88
env_file:
99
- deployment/default.env
1010
volumes:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)