Skip to content

Commit 4fb5c79

Browse files
authored
Issues 30 31 file reorg part 2 (#89)
* Rename project folder * Change cbv3_django_prototype references to project * Rename 'core' directory * Change references to users app * Change references to 'core' directory * Change project name to "Codebuddies" * Change path to /opt/codebuddies * Fix project path
1 parent 7fb330a commit 4fb5c79

File tree

118 files changed

+66
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+66
-65
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pip-selfcheck.json
284284
### Project template
285285

286286
MailHog
287-
cbv3_django_prototype/media/
287+
project/media/
288288

289289
.pytest_cache/
290290

cbv3_django_prototype/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ services:
2626
# nginx. The local project folder is mounted into the container as a volume to
2727
# allow development to be done on the host machine.
2828
app:
29-
build: ./cbv3_django_prototype
29+
build: ./project
3030
container_name: app
3131
restart: on-failure
3232
command: >
33-
sh -c "python /opt/cbv3_django_prototype/manage.py migrate &&
34-
uwsgi --ini /opt/cbv3_django_prototype/uwsgi.ini"
33+
sh -c "python /opt/codebuddies/manage.py migrate &&
34+
uwsgi --ini /opt/codebuddies/uwsgi.ini"
3535
volumes:
36-
- ./cbv3_django_prototype:/opt/cbv3_django_prototype
36+
- ./project:/opt/codebuddies
3737
environment:
3838
- DATABASE_URL=postgres://babyyoda:mysecretpassword@db:5432/codebuddies
3939
- EMAIL_HOST=mailhog
@@ -79,11 +79,11 @@ services:
7979
manage:
8080
container_name: manage
8181
restart: on-failure
82-
build: ./cbv3_django_prototype
82+
build: ./project
8383
command: shell
84-
entrypoint: /usr/local/bin/python3 /opt/cbv3_django_prototype/manage.py
84+
entrypoint: /usr/local/bin/python3 /opt/codebuddies/manage.py
8585
volumes:
86-
- ./cbv3_django_prototype:/opt/cbv3_django_prototype
86+
- ./project:/opt/codebuddies
8787
environment:
8888
- DATABASE_URL=postgres://babyyoda:mysecretpassword@db:5432/codebuddies
8989
- EMAIL_HOST=mailhog
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[run]
2-
include = cbv3_django_prototype/*
2+
include = project/*
33
omit = *migrations*, *tests*
44
plugins =
55
django_coverage_plugin

cbv3_django_prototype/.editorconfig renamed to project/.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ indent_size = 4
1414

1515
[*.py]
1616
line_length=120
17-
known_first_party=cbv3_django_prototype
17+
known_first_party=project
1818
multi_line_output=3
1919
default_section=THIRDPARTY
2020

File renamed without changes.
File renamed without changes.

project/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM python:3.7
2+
3+
RUN apt-get update && \
4+
apt-get install -y && \
5+
pip3 install uwsgi
6+
7+
COPY ./requirements/ /opt/codebuddies/requirements/
8+
9+
RUN python3 -m pip install --upgrade pip
10+
RUN pip3 install -r /opt/codebuddies/requirements/local.txt
11+
12+
RUN groupadd -r uwsgi && useradd -r -g uwsgi uwsgi
13+
14+
ENV DJANGO_ENV=prod
15+
ENV PYTHONUNBUFFERED 1
16+
ENV PYTHONPATH /opt/codebuddies/
17+
18+
COPY ./ /opt/codebuddies/
19+
20+
EXPOSE 8000
21+
22+
CMD ["uwsgi", "--ini", "/opt/codebuddies/uwsgi.ini"]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)