Skip to content

Commit 9118fd5

Browse files
committed
container
1 parent 73850a0 commit 9118fd5

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN apt update && apt install -y wget > /dev/null && rm -rf /var/lib/apt/lists/*
88
WORKDIR /proxy_py
99
USER user
1010
# TODO: change to master
11-
ARG VERSION=dockerizing
11+
ARG VERSION=73850a02909242bcc68f3257a8663ca113128704
1212

1313
RUN wget https://github.com/DevAlone/proxy_py/archive/$VERSION.tar.gz -O sources.tar.gz 2> /dev/null \
1414
&& tar -xf sources.tar.gz && rm sources.tar.gz \

config_examples/docker_settings.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from ._settings import *
2+
3+
DEBUG = False
4+
5+
# override db settings here
6+
DATABASE_CONNECTION_KWARGS['host'] = 'localhost'
7+
DATABASE_CONNECTION_KWARGS['database'] = 'proxy_py'
8+
DATABASE_CONNECTION_KWARGS['user'] = 'proxy_py'
9+
DATABASE_CONNECTION_KWARGS['password'] = 'proxy_py'
10+
11+
PROXY_PROVIDER_SERVER_ADDRESS = {
12+
'HOST': '0.0.0.0',
13+
'PORT': 55555,
14+
}

config_examples/settings.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
from ._settings import *
22

3-
DEBUG = False
4-
5-
DATABASE_CONNECTION_KWARGS['host'] = 'db'
6-
DATABASE_CONNECTION_KWARGS['database'] = 'proxy_py'
7-
DATABASE_CONNECTION_KWARGS['user'] = 'proxy_py'
8-
DATABASE_CONNECTION_KWARGS['password'] = 'proxy_py'
9-
10-
PROXY_PROVIDER_SERVER_ADDRESS = {
11-
'HOST': '0.0.0.0',
12-
'PORT': 55555,
13-
}
3+
# it should be empty to let environment variables be the most important ones

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ services:
1111
volumes:
1212
- pgdata:/home/user/proxy_py_postgres_data
1313
core:
14-
restart: always
1514
build: .
1615
ports:
1716
- "55555:55555"
17+
environment:
18+
- PROXY_PY_PROXY_PROVIDER_SERVER_ADDRESS="{'HOST':'0.0.0.0','PORT':55555}"
19+
- PROXY_PY_DATABASE_CONNECTION_KWARGS="{'host':'db','database':'proxy_py','user':'proxy_py','password':'proxy_py'}"
1820
depends_on:
1921
- db
2022

proxy_py/_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
DATABASE_CONNECTION_ARGS = ()
2727
DATABASE_CONNECTION_KWARGS = {
28+
'host': 'localhost',
2829
'database': 'proxy_py',
2930
'user': 'proxy_py',
3031
'password': 'proxy_py',

0 commit comments

Comments
 (0)