Skip to content

Commit

Permalink
added docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
carelessfinch committed Oct 16, 2021
1 parent c096686 commit b967145
Show file tree
Hide file tree
Showing 151 changed files with 24 additions and 30,654 deletions.
6 changes: 0 additions & 6 deletions AirBlue_Frontend/Dockerfile

This file was deleted.

30,621 changes: 0 additions & 30,621 deletions AirBlue_Frontend/package-lock.json

This file was deleted.

3 changes: 2 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY . /app
RUN python manage.py migrate
RUN python manage.py migrate
CMD gunicorn --timeout 120 --workers=3 -b 0.0.0.0:8000 airblue.wsgi
5 changes: 3 additions & 2 deletions backend/airblue/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
DEBUG ='false'

ALLOWED_HOSTS = [
env('DJANGO_ALLOWED_HOST', default='127.0.0.1')
env('DJANGO_ALLOWED_HOST', default='0.0.0.0')
]


Expand Down Expand Up @@ -174,6 +174,7 @@

INTERNAL_IPS = [
'127.0.0.1',
'0.0.0.0',
]
# Activate Django-Heroku.
django_heroku.settings(locals())
django_heroku.settings(locals())
9 changes: 0 additions & 9 deletions backend/release-tasks.sh

This file was deleted.

3 changes: 2 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ six==1.16.0
sqlparse==0.4.1
text-unidecode==1.3
whitenoise==5.2.0
django_heroku
django_heroku
gunicorn
13 changes: 6 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ services:
backend:
image: backend
build:
context: .
command: "python manage.py runserver"
context: backend
environment:
- DJANGO_ALLOWED_HOST='0.0.0.0'
ports:
- "8080:8080"
- "8000:8000"
frontend:
image: frontend
build:
context: AirBlue_Frontend
dockerfile: Dockerfile
command: "npm start"
context: frontend
ports:
- "80:80"
depends_on:
- backend
- backend
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:alpine as builder
RUN apk add --no-cache nodejs npm
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
RUN npm run build

FROM nginx
COPY --from=builder /app/build /usr/share/nginx/html
CMD ["nginx","-g","daemon off;"]
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

1 change: 0 additions & 1 deletion package.json

This file was deleted.

0 comments on commit b967145

Please sign in to comment.