Skip to content

Commit 4994dd4

Browse files
committed
add compose app version
1 parent 23108e3 commit 4994dd4

25 files changed

+111
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vprokoshev_dev/__pycache__/

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3.10-alpine
2+
3+
WORKDIR /app
4+
COPY . /app
5+
RUN pip install --upgrade pip && pip install -r requirements.txt
6+
RUN python3 manage.py collectstatic --noinput
7+
8+
EXPOSE 8000
9+
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "vprokoshev_dev.wsgi", "--workers=4"]

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<br>
2+
This is a webapp with information about my profile and my Resume<br>
3+
<br>
4+
Developed using DJANGO/HTML/CSS<br>
5+
Production stack is DOCKER/COMPOSE/NGINX/POSTGRES<br>
6+
<br>
7+
AVAILABLE ON LINK: http://prokoshev.dev <br>
8+

db.sqlite3

0 Bytes
Binary file not shown.

docker-compose.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: "3.7"
2+
3+
services:
4+
web:
5+
build:
6+
context: .
7+
volumes:
8+
- static_volume:/app/static
9+
command: sh -c "python3 manage.py migrate --noinput && gunicorn --bind 0.0.0.0:8000 vprokoshev_dev.wsgi --workers=4"
10+
expose:
11+
- "8000"
12+
depends_on:
13+
- postgres
14+
networks:
15+
- django-network
16+
nginx:
17+
image: nginx:1.23-alpine
18+
restart: always
19+
volumes:
20+
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
21+
- static_volume:/app/static
22+
ports:
23+
- "80:80"
24+
depends_on:
25+
- web
26+
networks:
27+
- django-network
28+
postgres:
29+
image: postgres:14-alpine
30+
restart: always
31+
environment:
32+
- POSTGRES_DB=prokoshev_dev_db
33+
- POSTGRES_USER=prokoshev_dev
34+
- POSTGRES_PASSWORD=prokoshev_dev
35+
ports:
36+
- '5432:5432'
37+
volumes:
38+
- db:/var/lib/postgresql/data
39+
networks:
40+
- django-network
41+
42+
43+
networks:
44+
django-network:
45+
name: django-network
46+
volumes:
47+
static_volume:
48+
db:
135 Bytes
Binary file not shown.
252 Bytes
Binary file not shown.
408 Bytes
Binary file not shown.
451 Bytes
Binary file not shown.
388 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)