Skip to content

Commit

Permalink
refactor: remove PORT environment variable
Browse files Browse the repository at this point in the history
Refs: #103
  • Loading branch information
zhannaklimanova committed Jun 30, 2024
1 parent 817f297 commit 5f4ae76
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ VERSION=0.1.0

DEVELOPMENT=false
HOST_NAME=vim.linkedmusic.ca
PORT=8000

## WEB APP ##
#DJANGO_SECRET_KEY=ADD DJANGO SECRET KEY HERE
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ NOTE: These instructions are for local development only. Refer to the "Installat
- UMIL requires Docker Engine with Compose V2. Verify your version with `docker compose --version` and look for an output such as `Docker Compose version v2.19.1`. If you do not have the correct version, refer to the [Docker Compose Migration Documentation](https://docs.docker.com/compose/migrate/).

### Initial Set-up Instructions
After cloning this repository, you will need a local `.env` file at the root of the directory. Copy the contents or rename the `.env.sample` file to `.env` and update it to include uncommented environment variables for the database credentials `POSTGRES_USER` and `POSTGRES_PASSWORD`, as well as the `DJANGO_SECRET_KEY`. The database credentials can be set to anything while the `DJANGO_SECRET_KEY` will need to be obtained from one of the developers working on the UMIL project. Next you will need to verify the values of the `DEVELOPMENT`, `HOST_NAME`, and `PORT` variables. For local development ONLY, these should be set to "true", "localhost", and "8000" respectively. \
After cloning this repository, you will need a local `.env` file at the root of the directory. Copy the contents or rename the `.env.sample` file to `.env` and update it to include uncommented environment variables for the database credentials `POSTGRES_USER` and `POSTGRES_PASSWORD`, as well as the `DJANGO_SECRET_KEY`. The database credentials can be set to anything while the `DJANGO_SECRET_KEY` will need to be obtained from one of the developers working on the UMIL project. Next you will need to verify the values of the `DEVELOPMENT` and `HOST_NAME` variables. For local development ONLY, these should be set to "true" and "localhost", respectively. \
In one terminal run the following commands to build the docker images and run the specified services.
```sh
docker compose build
Expand Down Expand Up @@ -50,7 +50,7 @@ UMIL requires Docker Engine with Compose V2. Ensure that the remote server has t

SSH into the server. After cloning the repository, set up a local `.env` file. Copy or rename the `.env.sample` file to `.env` and update it to include uncommented environment variables for database credentials `POSTGRES_USER` and `POSTGRES_PASSWORD`. Ensure that `POSTGRES_PASSWORD` is secure. Additionally, set `DJANGO_SECRET_KEY` with a secure secret key for Django.

Ensure that the `DEVELOPMENT` variable is set to "false", and that `HOST_NAME` is set to the host name where the UMIL instance will be served (for example, "vim.linkedmusic.ca" or "vim.staging.linkedmusic.ca"). Set the `PORT` variable to "80".
Ensure that the `DEVELOPMENT` variable is set to "false", and that `HOST_NAME` is set to the host name where the UMIL instance will be served (for example, "vim.linkedmusic.ca" or "vim.staging.linkedmusic.ca").
Run the following commands:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:
environment:
- HOST_NAME=${HOST_NAME}
ports:
- "${PORT}:80"
- "8000:80"
volumes:
- vim-static:/virtual-instrument-museum/static
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error_log /var/log/nginx/error.log warn; # piped to Docker log collector (see n
pid /var/log/nginx/nginx.pid;

events {
accept_mutex off;
accept_mutex off;
}

http {
Expand Down

0 comments on commit 5f4ae76

Please sign in to comment.