| author | ymh <ymh.work@gmail.com> |
| Wed, 24 Apr 2019 02:26:02 +0200 | |
| changeset 5 | 3b60692effa9 |
| parent 2 | 8bfef8029c17 |
| child 6 | 36381334b11e |
| 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 |
## Data management |
|
56 |
||
|
5
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
57 |
**!! 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 | 58 |
|
59 |
### Export database |
|
60 |
``` |
|
61 |
$ docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root db export --add-drop-table - > recherchecontributive_dbase_2019-04-19.sql |
|
62 |
``` |
|
63 |
||
64 |
### Export media |
|
65 |
``` |
|
66 |
$ tar zcf recherchecontributive_media_2019-04-19.tar.gz -C src/web/app/ uploads |
|
67 |
``` |
|
68 |
||
69 |
### Import database |
|
70 |
||
71 |
``` |
|
72 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root db import - < recherchecontributive_dbase_2019-04-19.sql |
|
73 |
``` |
|
74 |
||
75 |
If needed do a search replace after this to update the site urls: |
|
76 |
||
77 |
``` |
|
78 |
$ docker-compose exec wp /var/www/html/vendor/bin/wp --allow-root search-replace https://recherchecontributive.org http://localhost:8080 |
|
79 |
``` |
|
80 |
||
81 |
Or change the administration password |
|
82 |
``` |
|
83 |
$ docker-compose exec -T wp /var/www/html/vendor/bin/wp --allow-root user update admin --prompt=user_pass |
|
84 |
``` |
|
85 |
||
|
5
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
86 |
## Deployment |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
87 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
88 |
TODO... |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
89 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
90 |
## Built With |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
91 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
92 |
* [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
|
93 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
94 |
## Versioning |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
95 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
96 |
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
|
97 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
98 |
## Authors |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
99 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
100 |
* **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
|
101 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
102 |
## License |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
103 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
104 |
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
|
105 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
106 |
## Acknowledgments |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
107 |
|
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
108 |
* 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
|
109 |
* Wordpress: https://wordpress.org/ |
|
3b60692effa9
clean docker compose file and move data management in readme
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
110 |
* 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
|
111 |
* 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
|
112 |