File tree Expand file tree Collapse file tree 8 files changed +111
-26
lines changed
Expand file tree Collapse file tree 8 files changed +111
-26
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ONEKEY_API_EMAIL = " romain.kieffer@nc3.lu"
2+ ONEKEY_API_PASSWORD = " testing_platform_1key!"
3+
Original file line number Diff line number Diff line change 1+ ARG PYTHON_VERSION
2+ FROM python:${PYTHON_VERSION}
3+ ARG DEBUG
4+ ENV PYTHONUNBUFFERED 1
5+
6+ ENV APP_ROOT /var/www/testing_platform
7+ WORKDIR ${APP_ROOT}
8+
9+ COPY ../../requirements.txt ${APP_ROOT}
10+
11+ RUN pip3 install -r ${APP_ROOT}/requirements.txt
12+ RUN apt-get update && \
13+ apt-get install -y --no-install-recommends \
14+ iputils-ping nmap && \
15+ apt-get clean && \
16+ rm -rf /var/lib/apt/lists/*
17+
18+ EXPOSE 8000
19+
20+ COPY ../.. ${APP_ROOT}
21+ COPY compose/staging/entrypoint.sh ${APP_ROOT}
22+
23+ ENTRYPOINT [ "/var/www/testing_platform/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ services :
2+
3+ testing-platform :
4+ build :
5+ context : ../..
6+ dockerfile : compose/staging/Dockerfile
7+ args :
8+ - DEBUG=1
9+ - PYTHON_VERSION=3.12
10+ cache_from :
11+ - testing-platform:app
12+ image : " testing-platform:app"
13+ command : gunicorn testing_platform.wsgi:application --bind 0.0.0.0:8000
14+ volumes :
15+ - ../../static:/var/www/testing_platform/static
16+ expose :
17+ - 8000
18+
19+ nginx :
20+ build :
21+ context : ../../nginx
22+ cache_from :
23+ - testing-platform:nginx
24+ image : " testing-platform:nginx"
25+ volumes :
26+ - ../../static:/var/www/testing_platform/static
27+ ports :
28+ - ' 80:80'
29+ depends_on :
30+ - testing-platform
31+
32+ volumes :
33+ static :
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ python manage.py migrate
4+ python manage.py collectstatic --noinput
5+ exec python manage.py runserver 0.0.0.0:8000
6+
Original file line number Diff line number Diff line change 1+ FROM nginx:1.27.5-alpine
2+
3+ RUN rm /etc/nginx/conf.d/default.conf
4+ COPY nginx.conf /etc/nginx/conf.d
Original file line number Diff line number Diff line change 1+ upstream testing-platform {
2+ server testing-platform:8000 ;
3+ }
4+
5+ server {
6+ listen 80 ;
7+ server_name testing.office.lhc.lu;
8+
9+ location / {
10+ proxy_pass http ://testing-platform;
11+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
12+ proxy_set_header Host $host ;
13+ proxy_redirect off;
14+ }
15+
16+ location /static/ {
17+ alias /var/www/testing_platform/static/;
18+ }
19+
20+ }
Original file line number Diff line number Diff line change 1+ upstream testing-platform {
2+ server 127.0.0.1:8000;
3+ }
4+
5+ server {
6+ listen 80;
7+ server_name testing.develop.office.lhc.lu;
8+
9+ location / {
10+ proxy_pass http://testing.develop;
11+ proxy_read_timeout 300;
12+ proxy_redirect off;
13+ proxy_buffering off;
14+ proxy_store off;
15+ proxy_set_header Host $host;
16+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17+ }
18+
19+ location /static/ {
20+ alias /var/www/testing_platform/static/;
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments