Skip to content

Commit 0339b2d

Browse files
committed
Added instructions how to set up production server.
1 parent dedf5bc commit 0339b2d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,41 @@ This will start a Docker container with Supervisor and Gunicorn, instead of the
6565
supervisorctl -c /etc/supervisor/supervisord.conf restart edrop
6666
```
6767

68+
## Server Installation
69+
70+
1. Clone the repository.
71+
2. Copy the environment files needed (`.env`, `.env_app`, and `.docker-env`):
72+
```
73+
cp .env_app .env
74+
cp .env_app_example .env_app
75+
cp .docker-env-example .docker-env
76+
```
77+
2. Adjust the variables in the environemnt files as needed.
78+
3. Add service file to be able to start eDROP throush systemd to `/etc/systemd/system/edrop.service`:
79+
```
80+
[Unit]
81+
Wants=docker.service
82+
After=docker.service
83+
84+
[Service]
85+
RemainAfterExit=yes
86+
ExecStart=/usr/bin/docker compose -f /opt/edrop/edrop-connector/docker-compose-prod.yml up
87+
ExecStop=/usr/bin/docker compose -f /opt/edrop/edrop-connector/docker-compose-prod.yml down
88+
89+
[Install]
90+
WantedBy=multi-user.target
91+
```
92+
And reload systemd daemon, enable service so it starts on boot.
93+
4. Create database directory
94+
```
95+
mkdir data/db
96+
```
97+
5. Try to run it:
98+
```
99+
docker compose -f docker-compose-prod.yml up
100+
```
101+
6. If that works, stop and start through systemd.
102+
7. Edit webserver to proxy eDROP Django app.
103+
68104
## Copyright
69105
By committing code to this repository, you agree to transfer or license your copyright to the project under its current terms.

0 commit comments

Comments
 (0)