| author | ymh <ymh.work@gmail.com> |
| Sat, 06 Mar 2021 09:11:30 +0100 | |
| changeset 42 | 5bb33f78b519 |
| parent 35 | 7868b794e6cc |
| permissions | -rw-r--r-- |
| 0 | 1 |
# Recherchecontributive.org Website |
2 |
||
3 |
This project is the website for recherchecontributive.org. |
|
4 |
||
5 |
## Getting Started |
|
6 |
||
7 |
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. |
|
8 |
||
9 |
### Prerequisites |
|
10 |
||
11 |
What things you need to install the software and how to install them |
|
12 |
||
13 |
- docker |
|
14 |
- docker-compose |
|
15 |
- A code editor |
|
16 |
||
|
6
36381334b11e
use recherchecontributive.test as domain
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
17 |
In you local dns (/etc/hosts for example), map you Docker machine IP to the domain name `recherchecontributive.test`. |
| 0 | 18 |
|
19 |
### Installing |
|
20 |
||
| 35 | 21 |
*For WSL on Windows you may have to create an alias for docker-compose :``` $ alias docker-compose=docker-compose.exe```* |
22 |
||
23 |
||
|
2
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
24 |
Build docker images: |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
25 |
|
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
26 |
``` |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
27 |
$ docker-compose build |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
28 |
``` |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
29 |
|
| 0 | 30 |
Launch the project |
31 |
||
32 |
``` |
|
33 |
$ docker-compose up |
|
34 |
``` |
|
35 |
or |
|
36 |
``` |
|
37 |
$ docker-compose up -d |
|
38 |
``` |
|
39 |
||
40 |
import data. |
|
41 |
||
42 |
``` |
|
43 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root db import - < /path/to/recherchecontributive_dbase.sql |
|
44 |
``` |
|
45 |
||
46 |
Replace strings in database: |
|
47 |
||
48 |
``` |
|
|
6
36381334b11e
use recherchecontributive.test as domain
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
49 |
docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root search-replace https://recherchecontributive.org http://recherchecontributive.test:8080 |
| 0 | 50 |
``` |
51 |
||
52 |
Import media files: |
|
53 |
``` |
|
|
6
36381334b11e
use recherchecontributive.test as domain
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
54 |
$ tar -C src/web/app/ -zxf /path/to/recherchecontributive_media.tar.gz |
| 0 | 55 |
``` |
56 |
||
|
6
36381334b11e
use recherchecontributive.test as domain
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
57 |
Navigate to http://recherchecontributive.test:8080. |
| 0 | 58 |
|
59 |
## Data management |
|
60 |
||
|
5
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
61 |
**!! BEWARE !!**: Do not launch the `docker-compose down` command before exporting data. This command delete the `db` container's data volume end therefore delete the database. |
| 0 | 62 |
|
63 |
### Export database |
|
64 |
``` |
|
65 |
$ docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root db export --add-drop-table - > recherchecontributive_dbase_2019-04-19.sql |
|
66 |
``` |
|
67 |
||
68 |
### Export media |
|
69 |
``` |
|
70 |
$ tar zcf recherchecontributive_media_2019-04-19.tar.gz -C src/web/app/ uploads |
|
71 |
``` |
|
72 |
||
73 |
### Import database |
|
74 |
||
75 |
``` |
|
76 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root db import - < recherchecontributive_dbase_2019-04-19.sql |
|
77 |
``` |
|
78 |
||
79 |
If needed do a search replace after this to update the site urls: |
|
80 |
||
81 |
``` |
|
|
6
36381334b11e
use recherchecontributive.test as domain
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
82 |
$ docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root search-replace https://recherchecontributive.org http://recherchecontributive.test:8080 |
| 0 | 83 |
``` |
| 27 | 84 |
Set the template root |
85 |
``` |
|
| 28 | 86 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root option set template_root "/var/www/html/web/wp/wp-content/themes" |
| 27 | 87 |
``` |
88 |
||
89 |
delete options |
|
90 |
``` |
|
91 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root option delete _site_transient_update_themes |
|
92 |
``` |
|
93 |
``` |
|
94 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root option delete _site_transient_theme_roots |
|
95 |
``` |
|
96 |
||
| 0 | 97 |
|
98 |
Or change the administration password |
|
99 |
``` |
|
100 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root user update admin --prompt=user_pass |
|
101 |
``` |
|
102 |
||
| 27 | 103 |
Flush cache |
104 |
``` |
|
105 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root cache flush |
|
106 |
``` |
|
107 |
||
108 |
||
|
5
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
109 |
## Deployment |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
110 |
|
| 28 | 111 |
README.md in deploy folder |
|
5
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
112 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
113 |
## Built With |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
114 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
115 |
* [Wordpress](https://wordpress.org/) - The CMS used |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
116 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
117 |
## Versioning |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
118 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
119 |
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://www.iri.centrepompidou.fr/dev/hg/recherchecontributive.org/tags). |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
120 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
121 |
## Authors |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
122 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
123 |
* **Yves-Marie Haussonne** - *Initial work* |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
124 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
125 |
## License |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
126 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
127 |
This project is licensed under the CecCill License - see the [LICENSE.md](LICENSE.md) file for details |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
128 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
129 |
## Acknowledgments |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
130 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
131 |
* Hat tip to anyone whose code was used |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
132 |
* Wordpress: https://wordpress.org/ |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
133 |
* Bedrock: https://roots.io/bedrock |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
134 |
* Docker for local wordpress development: https://urre.me/writings/docker-for-local-wordpress-development/ |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
135 |