2018-02-16 09:24:40 +00:00
|
|
|
# PTUT Virtual Environment
|
|
|
|
|
2018-03-14 21:47:58 +00:00
|
|
|
---
|
|
|
|
## Fast Install
|
2018-02-16 09:24:40 +00:00
|
|
|
|
2018-03-14 21:47:58 +00:00
|
|
|
Launch the following command in your favorite terminal :
|
|
|
|
```bash
|
|
|
|
curl https://xdrm.io/script/ptut-install | bash -
|
|
|
|
```
|
|
|
|
---
|
|
|
|
|
|
|
|
## Manual Install
|
2018-02-17 18:28:51 +00:00
|
|
|
## Cloning
|
|
|
|
|
|
|
|
In order for the *web* submodule to load, you **must** clone with :
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone --recursive https://git.xdrm.io/ptut/virtenv.git
|
|
|
|
```
|
|
|
|
|
2018-02-16 09:24:40 +00:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
You need a consistent Linux System with the following packages :
|
|
|
|
- `docker`
|
2018-02-17 16:45:13 +00:00
|
|
|
- `docker-compose`
|
2018-02-18 14:28:52 +00:00
|
|
|
- `make`
|
2018-02-16 09:24:40 +00:00
|
|
|
|
|
|
|
|
2018-02-17 16:45:13 +00:00
|
|
|
You need to add a local dns record in `/etc/hosts`:
|
|
|
|
```text
|
|
|
|
127.0.0.1 ptut.com
|
2018-02-16 09:24:40 +00:00
|
|
|
```
|
|
|
|
|
2018-02-17 16:45:13 +00:00
|
|
|
## Commands
|
2018-02-16 09:24:40 +00:00
|
|
|
|
|
|
|
|
2018-02-17 16:45:13 +00:00
|
|
|
**Launch the environment**
|
2018-02-16 09:24:40 +00:00
|
|
|
```bash
|
2018-02-18 14:28:52 +00:00
|
|
|
make start
|
2018-02-16 09:24:40 +00:00
|
|
|
```
|
2018-02-18 14:28:52 +00:00
|
|
|
- *pre-start* and *post-start* script will be executed (*i.e.* restore database, etc)
|
2018-02-17 16:45:13 +00:00
|
|
|
- the mounted files will match in the `./virtual` folder.
|
2018-02-18 14:34:58 +00:00
|
|
|
- the website will be accessible at [http://ptut.com:8080](http://ptut.com:8080).
|
2018-02-16 09:24:40 +00:00
|
|
|
|
2018-02-17 16:45:13 +00:00
|
|
|
**Stop the environment**
|
2018-02-16 09:24:40 +00:00
|
|
|
```bash
|
2018-02-18 14:28:52 +00:00
|
|
|
make stop
|
|
|
|
```
|
|
|
|
- *pre-stop* and *post-stop* script will be executed (*i.e.* backup database, etc)
|
|
|
|
- the mounted files will remain in `virtual/` (*e.g.* `/var/log/`).
|