diff --git a/web/Dockerfile b/web/Dockerfile index 9b45b29..a4a4b31 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -5,9 +5,6 @@ RUN apt-get update && \ apt-get install -y python3 python3-pip && \ rm -rf /var/lib/apt/lists/* -RUN apt-get update && \ - apt-get install -y tree - # Set working directory inside the container WORKDIR /usr/src/app @@ -16,12 +13,11 @@ RUN npm install ./web/src COPY web ./web/ COPY common ./common/ +RUN touch common/.env # Expose the port the app runs on -EXPOSE 3000 +EXPOSE 80 # Command to run the application CMD ["python3", "common/set-env-var.py"] -CMD ["tree"] -CMD ["cat", "common/.env"] CMD ["node", "--env-file=common/.env" , "web/src/app.js"] diff --git a/web/src/app.js b/web/src/app.js index 2ec9195..2714c3e 100644 --- a/web/src/app.js +++ b/web/src/app.js @@ -9,10 +9,10 @@ const pg = require('pg'); //#region CONSTANTS const staticDir = path.join(__dirname, '../public'); -const port = 3000 +const port = 80 const clientId = process.env.CLIENT_ID; const clientSecret = process.env.CLIENT_SECRET; -const redirectUri = 'http://localhost:3000/callback'; +const redirectUri = 'http://localhost:80/callback'; const scope = 'user-read-private user-read-email user-library-read user-library-modify'; const { Client } = pg const client = new Client({