Skip to content

Commit

Permalink
Merge pull request #225 from bounswe/feature/MIL-4
Browse files Browse the repository at this point in the history
Last changes for deployment.
  • Loading branch information
KarahanS authored Oct 31, 2022
2 parents 75ea740 + cdad56b commit 629ae7a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion App/backend/backend/settings/production.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .base import *

DEBUG = True # Set this to False in the future and fill in the allowed_hosts section.
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['34.125.134.88']

DATABASES = {
'default': {
Expand Down
27 changes: 9 additions & 18 deletions App/frontend/Dockerfile.production
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
FROM node:16-alpine AS builder

ENV NODE_ENV production

# build step
FROM node:16.13.2-alpine as build
WORKDIR /app

COPY ./package.json ./

COPY package.json ./
RUN npm install

COPY . .

COPY . ./
RUN npm run build

# Fetching the latest nginx image
FROM nginx

# Copying built assets from builder
COPY --from=builder /app/build /usr/share/nginx/html

# Copying our nginx.conf
COPY nginx.conf /etc/nginx/conf.d/default.conf
# release step
FROM nginx:1.21.5-alpine as release
COPY --from=build /app/build /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
2 changes: 1 addition & 1 deletion App/frontend/src/components/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Login(props) {
function handleSubmit(event) {
event.preventDefault();

fetch("http://44.211.68.74:8000/api/v1/auth/login/", {
fetch("http://34.125.134.88:8000/api/v1/auth/login/", {
method: "POST",
body: JSON.stringify(loginInput),
headers: {
Expand Down
2 changes: 1 addition & 1 deletion App/frontend/src/components/SignupModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Signup(props) {
function handleSubmit(event) {
event.preventDefault();

fetch("http://44.211.68.74:8000/api/v1/auth/register/", {
fetch("http://34.125.134.88:8000/api/v1/auth/register/", {
method: "POST",
body: JSON.stringify(signupInput),
headers: {
Expand Down
2 changes: 1 addition & 1 deletion App/frontend/src/layout/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Sidebar(props) {

function handleLogOut() {

fetch("http://44.211.68.74:8000/api/v1/auth/logout/", {
fetch("http://34.125.134.88:8000/api/v1/auth/logout/", {
method: "POST",
body: "",
headers: {
Expand Down

0 comments on commit 629ae7a

Please sign in to comment.