@@ -5,60 +5,53 @@ To simplify set up of a development environment, LinuxFr.org can be
55run with a container engine like Docker or Podman with the [ ` compose.yml ` ] ( ./compose.yaml )
66file which describes how to build all needed services.
77
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/ ) ).
8+ By default, the LinuxFr.org services will be provided under the domain names
9+ ` dlfp.lo ` and ` image.dlfp.lo ` . So you'll need to add the
10+ following line into the ` /etc/hosts ` file of your machine:
11+
12+ ```
13+ 127.0.0.1 dlfp.lo image.dlfp.lo
14+ ```
15+
16+ Then, if you use the Docker engine, you can use the ` docker compose up `
17+ command to start the system (you need to install the
18+ [ Docker compose plugin] ( https://docs.docker.com/compose/ ) first).
1019
1120> Note: with the Docker engine, you need to enable the Docker BuildKit builder.
1221> Either you have a Docker version which uses it by default, or you set the
1322> environment variable ` export DOCKER_BUILDKIT=1 ` .
1423
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
24+ If you use the Podman engine, you can either use the same Docker compose plugin
25+ or the [ podman-compose] ( https://github.com/containers/podman-compose/ )
26+ tool. The podman cli itself provides a wrapper of one of these two tools
27+ through the
1828[ ` podman compose ` command] ( https://docs.podman.io/en/latest/markdown/podman-compose.1.html ) .
1929Thus you need to use the ` podman compose up ` command to start the system.
2030
21- At this point, the documentation will give you ` docker compose ` commands, but you should be able
22- to use ` podman compose ` without any issue.
31+ At this point, this documentation will give you ` docker compose ` commands,
32+ but you should be able to use ` podman compose ` without any issue.
2333
24- To init the SQL database schema, you need to wait up to the ` database `
25- container to be ready to listen MySQL connections.
34+ To setup the SQL database schema, you need to wait until the ` database `
35+ container becomes ready to listen MySQL connections.
2636
2737For example, you should see in the logs:
2838
29- > database_1 | 2020-09-21 16:03:12 139820938893312 [ Note] mysqld: ready for connections.
39+ > database_1 | 2020-09-21 16:03:12 139820938893312 [ Note] * mysqld: ready for connections.*
3040>
3141> database_1 | Version: '10.1.46-MariaDB-1\~ bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
3242
33- Or you can check the ` database ` container status to be "healthy".
43+ Or you can check the ` database ` container status to be * healthy* with the
44+ ` docker compose ps ` command.
3445
3546Then, open a second terminal and run:
3647
3748```
3849docker compose exec linuxfr.org bin/rails db:setup
3950```
4051
41- Finally, the environment is ready and you can open [ http://dlfp.lo ] ( http://dlfp.lo )
52+ Finally, the environment is ready and you can open [ http://dlfp.lo:9000 ] ( http://dlfp.lo:9000 )
4253in your favorite browser.
4354
44- Notes:
45-
46- 1 . to be able to access this URL, you'll need to add the following line
47- into the ` /etc/hosts ` file of your machine:
48-
49- ```
50- 127.0.0.1 dlfp.lo image.dlfp.lo
51- ```
52-
53- 2 . for [ rootless containers] ( https://rootlesscontaine.rs/ ) , you'll need
54- to allow standard users to listen on ports less than 1024
55- (this is needed because linuxfr use port 80 and 443):
56-
57- ``` sh
58- sudo sysctl net.ipv4.ip_unprivileged_port_start=80
59- ```
60-
61-
6255Personalize configuration
6356=========================
6457
@@ -68,16 +61,14 @@ If you want, you can change the domain names used by the LinuxFr.org
6861web application. To do this, you can setup ` DOMAIN ` and ` IMAGE_DOMAIN `
6962variables in the ` deployment/default.env ` file.
7063
71- You can also configure your own Redis service and your own MySQL
72- service.
73-
74- If you want to change the application port and/or other configurations, you can
75- [ override] ( https://docs.docker.com/compose/extends/ )
76- the docker compose configuration (in particular the ` nginx ` service for
77- the port).
64+ Within the same file, you can update the HTTP listening ports by updating the
65+ ` DOMAIN_HTTP_PORT ` and ` IMAGE_DOMAIN_HTTP_PORT ` variables (both are set to
66+ ` 9000 ` by default). If you modify them, don't forget to add the new values as
67+ published ports for the ` nginx ` service in the ` compose.yaml ` file (they have
68+ to target the ` 8080 ` container port).
7869
79- Notice, that if LinuxFr.org doesn't run on port 80, the image cache
80- service won't work well and so you won't be able to see images in the news .
70+ You can also configure your own Redis service and your own MySQL
71+ service by updating environment variables in the same file .
8172
8273Test modifications
8374==================
0 commit comments