File tree Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1
1
/.idea /
2
2
/* .iml
3
3
4
+ /data /
4
5
/.coverage_html /
5
- /.coverage
6
+ /.coverage
7
+ /.env
Original file line number Diff line number Diff line change 1
1
FROM python:3.8
2
- MAINTAINER phpusr
3
2
4
3
ENV PYTHONBUFFERED 1
5
4
ENV PORT 8000
@@ -8,13 +7,12 @@ ENV DEBUG False
8
7
WORKDIR /app/
9
8
10
9
# Install dependencies
11
- COPY Pipfile Pipfile .lock ./
10
+ COPY Pipfile.lock ./
12
11
RUN pip install --upgrade pipenv \
13
- && pipenv lock -- requirements > requirements.txt \
12
+ && pipenv requirements > requirements.txt \
14
13
&& pip install -r requirements.txt \
15
- && pipenv --rm \
16
14
&& pip uninstall -y pipenv \
17
- && rm Pipfile Pipfile .lock requirements.txt
15
+ && rm Pipfile.lock requirements.txt
18
16
19
17
# Add user
20
18
RUN useradd user
Original file line number Diff line number Diff line change 20
20
with open (enc_service_account_file_path ) as enc_file :
21
21
gdrive_account_data = signing .loads (enc_file .read ())
22
22
23
- service_account_file_path = os .path .join (settings . BASE_DIR , 'gdrive_account.json' )
23
+ service_account_file_path = os .path .join ('/tmp' , 'gdrive_account.json' )
24
24
with open (service_account_file_path , 'w' ) as service_account_file :
25
25
json .dump (gdrive_account_data , service_account_file )
26
26
Original file line number Diff line number Diff line change @@ -7,13 +7,17 @@ services:
7
7
image : phpusr/wildrace
8
8
restart : unless-stopped
9
9
ports :
10
- - 8010:8000
10
+ - ${PORT:- 8010} :8000
11
11
environment :
12
12
- DEBUG=False
13
13
- APP_LOG_LEVEL=DEBUG
14
- - PORT=8000
15
- - DATABASE_URL=postgres://postgres:mysuperpassword@db:5432/app
14
+ - DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/app
16
15
- REDIS_URL=redis://redis:6379
16
+ - DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
17
+ - GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}
18
+ - SENTRY_BACKEND_DSN=${SENTRY_BACKEND_DSN}
19
+ volumes :
20
+ - ./data/db:/app/data
17
21
depends_on :
18
22
- db
19
23
- redis
@@ -24,8 +28,10 @@ services:
24
28
restart : unless-stopped
25
29
environment :
26
30
- POSTGRES_DB=app
27
- - POSTGRES_USER=postgres
28
- - POSTGRES_PASSWORD=mysuperpassword
31
+ - POSTGRES_USER=${POSTGRES_USER}
32
+ - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
33
+ volumes :
34
+ - ./data/pgdata:/var/lib/postgresql/data
29
35
30
36
redis :
31
37
container_name : wildrace-redis
You can’t perform that action at this time.
0 commit comments