@@ -1,19 +1,19 | |||||
1 |
|
1 | |||
2 | REDIS_HOST=radarsys-redis |
|
2 | REDIS_HOST=radarsys-redis | |
3 | REDIS_PORT=6300 |
|
3 | REDIS_PORT=6300 | |
4 | POSTGRES_PORT_5432_TCP_ADDR=radarsys-postgres |
|
4 | POSTGRES_PORT_5432_TCP_ADDR=radarsys-postgres | |
5 | # POSTGRES_PORT_5432_TCP_PORT=5400 |
|
5 | # POSTGRES_PORT_5432_TCP_PORT=5400 | |
6 | POSTGRES_PORT_5432_TCP_PORT=5432 |
|
6 | POSTGRES_PORT_5432_TCP_PORT=5432 | |
7 | #POSTGRES_HOST?? DONDE IRIA |
|
7 | #POSTGRES_HOST?? DONDE IRIA | |
8 | POSTGRES_USER=docker |
|
8 | # POSTGRES_USER=docker | |
9 | POSTGRES_PASSWORD=docker |
|
9 | # POSTGRES_PASSWORD=docker | |
10 | POSTGRES_DB=radarsys |
|
10 | # POSTGRES_DB=radarsys | |
11 |
|
11 | |||
12 | # DB_NAME=radarsys |
|
12 | # DB_NAME=radarsys | |
13 | # DB_USER=docker |
|
13 | # DB_USER=docker | |
14 | # DB_PASSWORD=docker |
|
14 | # DB_PASSWORD=docker | |
15 | PGDATA=/var/lib/postgresql/data |
|
15 | PGDATA=/var/lib/postgresql/data | |
16 | LC_ALL=C.UTF-8 |
|
16 | LC_ALL=C.UTF-8 | |
17 | TZ=America/Lima |
|
17 | TZ=America/Lima | |
18 | DOCKER_DATA=/data/dockers/radarsys/ |
|
18 | DOCKER_DATA=/data/dockers/radarsys/ | |
19 | LOCAL_IP=192.168.1.128 No newline at end of file |
|
19 | LOCAL_IP=192.168.1.128 |
@@ -1,7 +1,8 | |||||
1 | pipLibraries/ |
|
1 | pipLibraries/ | |
2 | .DS_Store |
|
2 | .DS_Store | |
3 | *.sqlite |
|
3 | *.sqlite | |
4 | .vscode/ |
|
4 | .vscode/ | |
5 | *.pyc |
|
5 | *.pyc | |
6 | .env |
|
6 | .env | |
7 | remove_migrations.py |
|
7 | remove_migrations.py | |
|
8 | migrations/ |
@@ -1,39 +1,39 | |||||
1 | FROM python:3.9.16-slim-bullseye |
|
1 | FROM python:3.9.16-slim-bullseye | |
2 |
|
2 | |||
3 | # set working directory |
|
3 | # set working directory | |
4 | RUN mkdir /radarsys |
|
4 | RUN mkdir /radarsys | |
5 | RUN pwd |
|
5 | RUN pwd | |
6 | WORKDIR /radarsys |
|
6 | WORKDIR /radarsys | |
7 | COPY /pipLibraries ./ |
|
7 | COPY /pipLibraries ./ | |
8 | RUN pwd |
|
8 | RUN pwd | |
9 | RUN ls -al |
|
9 | RUN ls -al | |
10 |
|
10 | |||
11 | # Install python dependences |
|
11 | # Install python dependences | |
12 | ADD requirements.txt ./requirements.txt |
|
12 | ADD requirements.txt ./requirements.txt | |
13 | RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \ |
|
13 | RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \ | |
14 | gcc \ |
|
14 | gcc \ | |
15 | g++ \ |
|
15 | g++ \ | |
16 | && pip install -v --timeout 120 --no-cache-dir ./Django-4.1.5-py3-none-any.whl \ |
|
16 | # && pip install -v --timeout 120 --no-cache-dir ./Django-4.1.5-py3-none-any.whl \ | |
17 | && pip install -v --timeout 120 --no-cache-dir ./django-bootstrap5-22.2.tar.gz \ |
|
17 | # && pip install -v --timeout 120 --no-cache-dir ./django-bootstrap5-22.2.tar.gz \ | |
18 | && pip install -v --timeout 120 --no-cache-dir ./psycopg2_binary-2.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ |
|
18 | # && pip install -v --timeout 120 --no-cache-dir ./psycopg2_binary-2.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ | |
19 | && pip install -v --timeout 120 --no-cache-dir ./django-polymorphic-3.1.0.tar.gz \ |
|
19 | # && pip install -v --timeout 120 --no-cache-dir ./django-polymorphic-3.1.0.tar.gz \ | |
20 | && pip install -v --timeout 120 --no-cache-dir ./numpy-1.24.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ |
|
20 | # && pip install -v --timeout 120 --no-cache-dir ./numpy-1.24.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ | |
21 | && pip install -v --timeout 120 --no-cache-dir ./bokeh-3.0.3-py3-none-any.whl\ |
|
21 | # && pip install -v --timeout 120 --no-cache-dir ./bokeh-3.0.3-py3-none-any.whl\ | |
22 | && pip install -v --timeout 120 --no-cache-dir ./matplotlib-3.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ |
|
22 | # && pip install -v --timeout 120 --no-cache-dir ./matplotlib-3.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ | |
23 | && pip install -v --timeout 120 --no-cache-dir ./scipy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ |
|
23 | # && pip install -v --timeout 120 --no-cache-dir ./scipy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ | |
24 | && pip install -v --timeout 120 --no-cache-dir ./celery-5.2.7.tar.gz \ |
|
24 | # && pip install -v --timeout 120 --no-cache-dir ./celery-5.2.7.tar.gz \ | |
25 | && pip install -v --timeout 120 --no-cache-dir ./gunicorn-20.1.0-py3-none-any.whl \ |
|
25 | # && pip install -v --timeout 120 --no-cache-dir ./gunicorn-20.1.0-py3-none-any.whl \ | |
26 | && pip install -v --timeout 120 --no-cache-dir ./requests-2.28.2-py3-none-any.whl \ |
|
26 | # && pip install -v --timeout 120 --no-cache-dir ./requests-2.28.2-py3-none-any.whl \ | |
27 | && pip install -v --timeout 120 --no-cache-dir ./redis-4.4.2-py3-none-any.whl \ |
|
27 | # && pip install -v --timeout 120 --no-cache-dir ./redis-4.4.2-py3-none-any.whl \ | |
28 | && pip install -v --timeout 120 --no-cache-dir ./graphene_django-3.0.0-py2.py3-none-any.whl \ |
|
28 | # && pip install -v --timeout 120 --no-cache-dir ./graphene_django-3.0.0-py2.py3-none-any.whl \ | |
29 | && pip install -v --timeout 120 --no-cache-dir ./channels-4.0.0.tar.gz \ |
|
29 | # && pip install -v --timeout 120 --no-cache-dir ./channels-4.0.0.tar.gz \ | |
30 | && pip install -v --timeout 120 --no-cache-dir ./daphne-4.0.0.tar.gz \ |
|
30 | # && pip install -v --timeout 120 --no-cache-dir ./daphne-4.0.0.tar.gz \ | |
31 |
|
|
31 | && pip install -v --timeout 120 -r requirements.txt --no-cache-dir \ | |
32 | && apt-get purge -y --auto-remove gcc g++\ |
|
32 | && apt-get purge -y --auto-remove gcc g++\ | |
33 | && rm -rf /var/lib/apt/lists/* |
|
33 | && rm -rf /var/lib/apt/lists/* | |
34 |
|
34 | |||
35 | # Copy the main application. |
|
35 | # Copy the main application. | |
36 | COPY . ./ |
|
36 | COPY . ./ | |
37 |
|
37 | |||
38 | EXPOSE 8000 |
|
38 | EXPOSE 8000 | |
39 |
|
39 |
@@ -1,74 +1,75 | |||||
1 |
version: ' |
|
1 | version: '3' | |
2 | services: |
|
2 | services: | |
3 | # Django app |
|
3 | # Django app | |
4 | web: |
|
4 | web: | |
5 | container_name: 'radarsys' |
|
5 | container_name: 'radarsys' | |
6 | build: . |
|
6 | build: . | |
7 | restart: always |
|
7 | restart: always | |
8 | image: radarsys |
|
8 | image: radarsys | |
9 | command: gunicorn radarsys.wsgi:application -w 2 -b :8000 |
|
9 | command: gunicorn radarsys.wsgi:application -w 2 -b :8000 | |
10 | #command: python manage.py runserver 0.0.0.0:8000 |
|
10 | #command: python manage.py runserver 0.0.0.0:8000 | |
11 | ports: |
|
11 | ports: | |
12 | - 8000:8000 |
|
12 | - 8000:8000 | |
13 | #ports: |
|
13 | #ports: | |
14 | # - 8030:8030 |
|
14 | # - 8030:8030 | |
15 | env_file: .env |
|
15 | env_file: .env | |
16 |
|
16 | |||
17 | links: |
|
17 | links: | |
18 | # - redis |
|
18 | # - redis | |
19 | - postgres |
|
19 | - postgres | |
20 | volumes: |
|
20 | volumes: | |
21 | - './:/radarsys' |
|
21 | - './:/radarsys' | |
22 | - '${DOCKER_DATA}/static:/radarsys/static' |
|
22 | - '${DOCKER_DATA}/static:/radarsys/static' | |
23 | depends_on: |
|
23 | depends_on: | |
24 | # - redis |
|
24 | # - redis | |
25 | - postgres |
|
25 | - postgres | |
26 |
|
26 | |||
27 | # redis: |
|
27 | # redis: | |
28 | # container_name: 'radarsys-redis' |
|
28 | # container_name: 'radarsys-redis' | |
29 | # image: 'redis:3.2-alpine' |
|
29 | # image: 'redis:3.2-alpine' | |
30 | # volumes: |
|
30 | # volumes: | |
31 | # - '${DOCKER_DATA}/redis:/data' |
|
31 | # - '${DOCKER_DATA}/redis:/data' | |
32 |
|
32 | |||
33 | # celery_worker: |
|
33 | # celery_worker: | |
34 | # container_name: 'radarsys-celery' |
|
34 | # container_name: 'radarsys-celery' | |
35 | # image: radarsys |
|
35 | # image: radarsys | |
36 | # env_file: .env |
|
36 | # env_file: .env | |
37 | # command: celery -A radarsys worker -l info |
|
37 | # command: celery -A radarsys worker -l info | |
38 | # volumes_from: |
|
38 | # volumes_from: | |
39 | # - web |
|
39 | # - web | |
40 | # depends_on: |
|
40 | # depends_on: | |
41 | # - web |
|
41 | # - web | |
42 |
|
42 | |||
43 | # PostgreSQL |
|
43 | # PostgreSQL | |
44 | postgres: |
|
44 | postgres: | |
45 | container_name: 'radarsys-postgres' |
|
45 | container_name: 'radarsys-postgres' | |
46 | build: ./postgres/ |
|
46 | build: ./postgres/ | |
47 | volumes: |
|
47 | volumes: | |
48 | - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d |
|
48 | - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | |
49 | - pgdata:/var/lib/postgresql/data |
|
49 | - pgdata:/var/lib/postgresql/data | |
50 | ports: |
|
50 | ports: | |
51 | - 5432:5432 |
|
51 | - 5432:5432 | |
52 | environment: |
|
52 | #TEMPORAL, NO DEBE HARDCODEARSE | |
53 | - POSTGRES_PASSWORD=docker |
|
53 | # environment: | |
54 |
- POSTGRES_ |
|
54 | # - POSTGRES_PASSWORD=docker | |
55 |
- POSTGRES_ |
|
55 | # - POSTGRES_USER=docker | |
|
56 | # - POSTGRES_DB=radarsys | |||
56 | env_file: .env |
|
57 | env_file: .env | |
57 |
|
58 | |||
58 | #Web Server |
|
59 | #Web Server | |
59 | nginx: |
|
60 | nginx: | |
60 | container_name: 'radarsys-nginx' |
|
61 | container_name: 'radarsys-nginx' | |
61 | restart: always |
|
62 | restart: always | |
62 | build: ./nginx/ |
|
63 | build: ./nginx/ | |
63 | ports: |
|
64 | ports: | |
64 | - '8030:8030' |
|
65 | - '8030:8030' | |
65 | volumes_from: |
|
66 | volumes_from: | |
66 | - web |
|
67 | - web | |
67 | links: |
|
68 | links: | |
68 | - web:web |
|
69 | - web:web | |
69 | depends_on: |
|
70 | depends_on: | |
70 | - web |
|
71 | - web | |
71 |
|
72 | |||
72 | volumes: |
|
73 | volumes: | |
73 | pgdata: |
|
74 | pgdata: | |
74 | driver: local |
|
75 | driver: local |
@@ -1,5 +1,6 | |||||
1 | FROM postgres:14.6-alpine |
|
1 | FROM postgres:14.6-alpine | |
2 | #FROM library/postgres |
|
2 | #FROM library/postgres | |
3 |
|
3 | |||
4 | RUN mkdir -p "$PGDATA" && chmod 700 "$PGDATA" |
|
4 | RUN mkdir -p "$PGDATA" && chmod 700 "$PGDATA" | |
5 | #COPY ./init.sql /docker-entrypoint-initdb.d/ |
|
5 | #COPY ./init.sql /docker-entrypoint-initdb.d/ | |
|
6 | COPY init.sql /docker-entrypoint-initdb.d/ No newline at end of file |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
General Comments 0
You need to be logged in to leave comments.
Login now