Skip to content

Commit

Permalink
Added instructions how to set up production server.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdamerow committed Jan 23, 2025
1 parent dedf5bc commit 0339b2d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,41 @@ This will start a Docker container with Supervisor and Gunicorn, instead of the
supervisorctl -c /etc/supervisor/supervisord.conf restart edrop
```

## Server Installation

1. Clone the repository.
2. Copy the environment files needed (`.env`, `.env_app`, and `.docker-env`):
```
cp .env_app .env
cp .env_app_example .env_app
cp .docker-env-example .docker-env
```
2. Adjust the variables in the environemnt files as needed.
3. Add service file to be able to start eDROP throush systemd to `/etc/systemd/system/edrop.service`:
```
[Unit]
Wants=docker.service
After=docker.service
[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/docker compose -f /opt/edrop/edrop-connector/docker-compose-prod.yml up
ExecStop=/usr/bin/docker compose -f /opt/edrop/edrop-connector/docker-compose-prod.yml down
[Install]
WantedBy=multi-user.target
```
And reload systemd daemon, enable service so it starts on boot.
4. Create database directory
```
mkdir data/db
```
5. Try to run it:
```
docker compose -f docker-compose-prod.yml up
```
6. If that works, stop and start through systemd.
7. Edit webserver to proxy eDROP Django app.

## Copyright
By committing code to this repository, you agree to transfer or license your copyright to the project under its current terms.

0 comments on commit 0339b2d

Please sign in to comment.