2. Install **mod_wsgi** compiled with python3: `sudo apt-get install libapache2-mod-wsgi-py3`
@ -99,7 +100,7 @@ Make sure to replace `your_app`, appropriately, and set the location of your pyt
By going to **localhost/your_app** in your browser you should be able to see now your website, and if it has any interacitvity that runs some Python in the background it should work too. This will be up until you turn of you computer, or stop Apache2.
# Testing your website with Docker
## Testing your website with Docker
Since the site on hal.elte.hu will run inside a Docker container, before publishing you should test your work locally. To install Docker visit [this](https://docs.docker.com/get-docker/) link.
Once Docker is up and running, you should make a new project folder **DO NOT USE /var/www/html/!**, and copy `your_app.conf` and the `your_app folder` from `/var/www/html/` inside. (You should omit copying the venv.) Once you're done adding some other scirpts detailed a little further, the folder struture should look like this:
> |----/your_app_docker/
@ -186,7 +187,7 @@ With everything in place go to `/your_app_docker` and run the following commands
Then you should be able to access your website at **localhost:8085/your_app**. Once you're done you can stop and remove both the container and the image.
# Upload your project to Gitea
## Upload your project to Gitea
Now that Docker can run your site with an Apache2 server locally you can upload it to Gitea, so it can also be built and run on hal.elte.hu.
1. Navigate to `/your_app_docker`, you don't need to remove any file, nor you need to add anything.
2. `touch README.md`
@ -197,7 +198,7 @@ Now that Docker can run your site with an Apache2 server locally you can upload
7. `git push -u origin master`
For the push to succed you have to add an ssh public key to your gitea account. (*Settings->SSH/GPG keys->Add Key*) The easiest (laziest) solution would be to upload the public key that corresponds to your `.ssh/is_rsa`.
# Testing Docker & Gitea together
## Testing Docker & Gitea together
Now your site is ready to be deployed, but it's good practice to test ***locally*** first.