Skip to content

Commit 6e772ab

Browse files
Dockerized
1 parent 1b2df7d commit 6e772ab

File tree

5 files changed

+11
-87
lines changed

5 files changed

+11
-87
lines changed

docker-compose.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,19 @@ version: '3.7'
22

33
services:
44
backend:
5-
build:
6-
context: .
5+
image: nxtbn/nxtbn:latest
6+
container_name: nxtbn_backend
7+
ports:
8+
- "8000:8000"
9+
# environment:
10+
# DATABASE_NAME: ${DATABASE_NAME}
11+
# DATABASE_USER: ${DATABASE_USER}
12+
# DATABASE_PASSWORD: ${DATABASE_PASSWORD}
13+
# DATABASE_HOST: ${DATABASE_HOST}
14+
# DATABASE_PORT: ${DATABASE_PORT}
715
volumes:
816
- static_data:/backend/staticfiles
9-
- "./dist/media:/backend/media" # map to local machine
10-
env_file: # if .env in root, we have to show .env here must
11-
- ./.env
12-
# depends_on:
13-
# - db
17+
- "./dist/media:/backend/media"
1418

15-
proxy:
16-
build:
17-
context: ./proxy
18-
volumes:
19-
- static_data:/backend/staticfiles
20-
- "./dist/media:/backend/media" # map to local machine
21-
ports:
22-
- "80:80"
23-
env_file: # if .env in root, we have to show .env here must
24-
- ./.env
25-
depends_on:
26-
- backend
27-
# - db
28-
2919
volumes:
3020
static_data:
31-
# database:

proxy/Dockerfile

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

proxy/nginx.conf.example

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

proxy/ssl.conf

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

scripts/entrypoint.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
set -e
44

5-
# Wait for database running:
6-
sleep 5
7-
while [[ $(nc -z $db_host 5432 &> /dev/null; echo $?) -ne 0 ]]; do echo pod is not running;sleep 3; done
8-
95
python manage.py migrate
10-
python manage.py collectstatic --noinput
116

127
gunicorn nxtbn.wsgi:application --bind :8000

0 commit comments

Comments
 (0)