Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Easier deployment #21

Merged
merged 49 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
df5f732
Use docker entrypoint instead of deploy.sh
Baschdl Jun 15, 2020
4f37956
Use docker-compose directly instead of deploy.sh in travis.yml
Baschdl Jun 15, 2020
8b762fb
Correct formatting
Baschdl Jun 15, 2020
bc4943b
Set POT-Creation-Date to a constant
maltezacharias Jun 27, 2020
24258ce
Merge branch 'staging' into easier-deploy
maltezacharias Jun 27, 2020
2df0642
Fixing translations, people use POEDIT!!!
maltezacharias Jun 27, 2020
8641b2a
Remove app bind mount on production, README update
maltezacharias Jun 27, 2020
51662ca
Set user for backend via .env
maltezacharias Jun 27, 2020
859bc36
Move DB connectivity check to entrypoint
maltezacharias Jun 27, 2020
2ce2100
Remove fixed backend container name
maltezacharias Jun 27, 2020
aa34fd6
Persist logs even after removal of containers
maltezacharias Jun 27, 2020
a890598
Move collectstatic to entry point
maltezacharias Jun 27, 2020
3323a38
Fix permissions when not running backend as root
maltezacharias Jun 27, 2020
b954276
Move non-root settings to development docker
maltezacharias Jun 27, 2020
9ce23ec
Enable django-admin on dev docker
maltezacharias Jun 27, 2020
834f580
Rename backend folder to same name as in repo
maltezacharias Jun 27, 2020
288cdbe
Add tty to backend, some error messages will be hidden otherwise
maltezacharias Jun 27, 2020
ac7170a
Incorporate changes into travis config
maltezacharias Jun 27, 2020
a1b11e2
fix bash script syntax error
maltezacharias Jun 27, 2020
6de896b
Update Travis Website availability check script
maltezacharias Jun 27, 2020
792565a
fix backup script
maltezacharias Jun 27, 2020
0f57882
Merge branch 'staging' into easier-deploy
maltezacharias Jun 27, 2020
934d963
Update README.md
maltezacharias Jul 2, 2020
a94a48c
Fix backup script
maltezacharias Jul 2, 2020
c458215
Disable hot_standby
maltezacharias Jul 2, 2020
cc96713
Merge branch 'easier-deploy' of https://github.com/match4everyone/mat…
maltezacharias Jul 2, 2020
e640346
Switch database container to volumes and remove bind mounts
maltezacharias Jul 2, 2020
ae6bde3
Move log files to subfolder of run
maltezacharias Jul 2, 2020
4ca5504
Move collectstatic to docker build process
maltezacharias Jul 2, 2020
8a22197
Fix .gitignore order for .gitkeep entries
maltezacharias Jul 2, 2020
1be0688
Add empty log directory
maltezacharias Jul 2, 2020
3c64dd5
Merge branch 'staging' into easier-deploy
maltezacharias Jul 2, 2020
2fe1c1d
Update log location in travis scripts
maltezacharias Jul 2, 2020
e264e16
Add sample gateway error pages & nginx configuration (copy from m4h P…
maltezacharias Jul 2, 2020
1c9f998
Travis: Show logs after test rather than inbetween
maltezacharias Jul 2, 2020
da54151
Wait for backend check for connectivity
maltezacharias Jul 2, 2020
19b9e67
Wait_for_backend check log files
maltezacharias Jul 2, 2020
f2b1478
Make docker container bind to localhost (see m4h PR 540)
maltezacharias Jul 1, 2020
e8d741f
New backup script for volumes
maltezacharias Jul 2, 2020
ec620d5
Merge branch 'staging' into easier-deploy
kevihiiin Jul 4, 2020
b2e3422
Update backend/run/.gitignore
kevihiiin Jul 5, 2020
3cd4bf6
Update backend/Dockerfile
kevihiiin Jul 5, 2020
73a78ea
Move Travis environmental variables to docker-compose.prod.yml
kevihiiin Jul 5, 2020
f17a5a4
Use backend.dev.env file in development mode
Baschdl Jul 8, 2020
cb9735c
Create also a backend.dev.env file on travis
Baschdl Jul 8, 2020
6ed9e48
Add django backup to backup.sh and improve documentation
maltezacharias Jul 8, 2020
fdf39d1
Move whitenoise to common config
maltezacharias Jul 8, 2020
4d2036c
Ignore VSCode workspace
maltezacharias Jul 8, 2020
959c23d
Merge branch 'staging' into easier-deploy
maltezacharias Jul 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

before_script:
- ./scripts/write_envs_to_file.sh
- ./deploy.sh
- docker-compose -f docker-compose.dev.yml -f docker-compose.prod.yml up --build -d
- ./scripts/wait_for_backend.sh
- docker logs $(docker ps --format '{{.Names}}' | grep backend)
- docker logs $(docker ps --format '{{.Names}}' | grep database)
Expand Down
7 changes: 7 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y python3 python3-pip libpq-dev gettext

WORKDIR /match4everyone-backend
COPY requirements.txt /match4everyone-backend/requirements.txt
RUN pip3 install -r requirements.txt
COPY requirements.prod.txt /match4everyone-backend/requirements.prod.txt
RUN pip3 install -r requirements.prod.txt

COPY . .
RUN django-admin makemessages --no-location --ignore 00_old_m4h_matching_code
RUN django-admin compilemessages
RUN python3 manage.py collectstatic --no-input

EXPOSE 8000
ENTRYPOINT ["./entrypoint.sh"]
CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
6 changes: 6 additions & 0 deletions backend/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e -o pipefail
python3 manage.py migrate
python3 manage.py check

exec "$@"
16 changes: 0 additions & 16 deletions deploy.sh

This file was deleted.