@@ -5,60 +5,53 @@ To simplify set up of a development environment, LinuxFr.org can be
5
5
run with a container engine like Docker or Podman with the [ ` compose.yml ` ] ( ./compose.yaml )
6
6
file which describes how to build all needed services.
7
7
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).
10
19
11
20
> Note: with the Docker engine, you need to enable the Docker BuildKit builder.
12
21
> Either you have a Docker version which uses it by default, or you set the
13
22
> environment variable ` export DOCKER_BUILDKIT=1 ` .
14
23
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
18
28
[ ` podman compose ` command] ( https://docs.podman.io/en/latest/markdown/podman-compose.1.html ) .
19
29
Thus you need to use the ` podman compose up ` command to start the system.
20
30
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.
23
33
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.
26
36
27
37
For example, you should see in the logs:
28
38
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.*
30
40
>
31
41
> database_1 | Version: '10.1.46-MariaDB-1\~ bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
32
42
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.
34
45
35
46
Then, open a second terminal and run:
36
47
37
48
```
38
49
docker compose exec linuxfr.org bin/rails db:setup
39
50
```
40
51
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 )
42
53
in your favorite browser.
43
54
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
-
62
55
Personalize configuration
63
56
=========================
64
57
@@ -68,16 +61,14 @@ If you want, you can change the domain names used by the LinuxFr.org
68
61
web application. To do this, you can setup ` DOMAIN ` and ` IMAGE_DOMAIN `
69
62
variables in the ` deployment/default.env ` file.
70
63
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).
78
69
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 .
81
72
82
73
Test modifications
83
74
==================
0 commit comments