Repository navigation
Running the server in Docker (building yourself)
To run the server with Docker, have docker-compose and docker installed.
(Guide to install Docker on all platforms)
On Ubuntu:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose
In addition to docker, you need port 55230 accessible for TCU communications. For navigation unit, HTTP port 80, since it is incapable of handling SSL. The web portal can have SSL using Nginx or Apache server.
-
Clone the repository by git or download ZIP from Github:
git clone https://github.com/developerfromjokela/opencarwings.git -
Copy
.example.envto.envin root and edit environment files:
-
TZ-> Server Timezone (i.e. Europe/Helsinki) -
BACKEND_PORT-> Listening port for HTTP traffic (i.e. 0.0.0.0:80) -
TCPSERVER_PORT-> Listening port for TCU server port -
PSQL_NAME-> Database name (keep default) -
PSQL_USERNAME-> Database user username (keep default) -
PSQL_PASSWORD-> Database user password (set your own password, generate secure password withuuidgenor other high entropy source
- Copy
carwings/settings.docker.pytocarwings/settings.pyand modify settings:
-
SECRET_KEY-> Generate secure key withuuidgenor other high entropy source -
ALLOWED_HOSTS-> If you host the server behind a domain or IP address (local and/or WAN), enter your domain into the list like: ["domain.com", "domain2.com"] -
EMAIL_HOST-> SMTP Email server address -
EMAIL_USE_TLS-> True or False -
EMAIL_PORT-> SMTP Email server port -
EMAIL_HOST_USER-> Email account username -
EMAIL_HOST_PASSWORD-> Email account password
-
Start the server by running
docker-compose up -d -
Create admin account by running
docker exec -it opencarwings-server-1 python manage.py createsuperuser. (Check withdocker psif you get error about container not being found, container may have a different name.) -
Admin interface is available at
/admin, confirm everything is operational -
Last step is to disable
DEBUGincarwings/settings.py, set value to False and restart the server withdocker-compose down && docker-compose up -d