| author | ymh <ymh.work@gmail.com> |
| Tue, 23 Apr 2019 20:24:02 +0200 | |
| changeset 2 | 8bfef8029c17 |
| parent 0 | 800e4a6ab128 |
| child 5 | 3b60692effa9 |
| 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 |
||
17 |
||
18 |
### Installing |
|
19 |
||
|
2
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
20 |
Build docker images: |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
21 |
|
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
22 |
``` |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
23 |
$ docker-compose build |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
24 |
``` |
|
8bfef8029c17
Correct README and add missing wp-config file
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
25 |
|
| 0 | 26 |
Launch the project |
27 |
||
28 |
``` |
|
29 |
$ docker-compose up |
|
30 |
``` |
|
31 |
or |
|
32 |
``` |
|
33 |
$ docker-compose up -d |
|
34 |
``` |
|
35 |
||
36 |
import data. |
|
37 |
||
38 |
``` |
|
39 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root db import - < /path/to/recherchecontributive_dbase.sql |
|
40 |
``` |
|
41 |
||
42 |
Replace strings in database: |
|
43 |
||
44 |
``` |
|
45 |
docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root search-replace https://recherchecontributive.org http://localhost:8080 |
|
46 |
``` |
|
47 |
||
48 |
Import media files: |
|
49 |
``` |
|
50 |
$ tar -C src/web/app/ zxf /path/to/recherchecontributive_media.tar.gz |
|
51 |
``` |
|
52 |
||
53 |
Navigate to http://localhost:8080. |
|
54 |
||
55 |
## Deployment |
|
56 |
||
57 |
TODO... |
|
58 |
||
59 |
## Built With |
|
60 |
||
61 |
* [Wordpress](https://wordpress.org/) - The CMS used |
|
62 |
||
63 |
## Versioning |
|
64 |
||
65 |
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/tags). |
|
66 |
||
67 |
## Authors |
|
68 |
||
69 |
* **Yves-Marie Haussonne** - *Initial work* |
|
70 |
||
71 |
## License |
|
72 |
||
73 |
This project is licensed under the CecCill License - see the [LICENSE.md](LICENSE.md) file for details |
|
74 |
||
75 |
## Acknowledgments |
|
76 |
||
77 |
* Hat tip to anyone whose code was used |
|
78 |
* Wordpress: https://wordpress.org/ |
|
79 |
* Bedrock: https://roots.io/bedrock |
|
80 |
* Docker for loacl wordpress development: https://urre.me/writings/docker-for-local-wordpress-development/ |
|
81 |
||
82 |
||
83 |
## Data management |
|
84 |
||
85 |
||
86 |
### Export database |
|
87 |
``` |
|
88 |
$ docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root db export --add-drop-table - > recherchecontributive_dbase_2019-04-19.sql |
|
89 |
``` |
|
90 |
||
91 |
### Export media |
|
92 |
``` |
|
93 |
$ tar zcf recherchecontributive_media_2019-04-19.tar.gz -C src/web/app/ uploads |
|
94 |
``` |
|
95 |
||
96 |
### Import database |
|
97 |
||
98 |
``` |
|
99 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root db import - < recherchecontributive_dbase_2019-04-19.sql |
|
100 |
``` |
|
101 |
||
102 |
If needed do a search replace after this to update the site urls: |
|
103 |
||
104 |
``` |
|
105 |
$ docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root search-replace https://recherchecontributive.org http://localhost:8080 |
|
106 |
``` |
|
107 |
||
108 |
Or change the administration password |
|
109 |
``` |
|
110 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root user update admin --prompt=user_pass |
|
111 |
``` |
|
112 |