diff options
| author | Philipp Le <philipp-le-prviat@freenet.de> | 2020-09-19 22:54:48 +0200 |
|---|---|---|
| committer | Philipp Le <philipp-le-prviat@freenet.de> | 2021-06-29 16:01:43 +0200 |
| commit | 6b0b5fae076ba51c6c536b541e8f137039d8f915 (patch) | |
| tree | 737d99f8557227e5db9c7ffeb044e30c7f35eb8e | |
| parent | 25c42d36eb989ced5fccf17910609b62bc4a623d (diff) | |
| download | ihatemoney-mirror-6b0b5fae076ba51c6c536b541e8f137039d8f915.zip ihatemoney-mirror-6b0b5fae076ba51c6c536b541e8f137039d8f915.tar.gz ihatemoney-mirror-6b0b5fae076ba51c6c536b541e8f137039d8f915.tar.bz2 | |
Added Docker Compose
* Added Docker compose file
* Added postgresql to Docker image
| -rw-r--r-- | Dockerfile | 3 | ||||
| -rwxr-xr-x | conf/entrypoint.sh | 3 | ||||
| -rw-r--r-- | docker-compose.yml | 21 | ||||
| -rw-r--r-- | setup.cfg | 1 |
4 files changed, 26 insertions, 2 deletions
@@ -19,11 +19,12 @@ ENV NIGHTLY="" \ BABEL_DEFAULT_TIMEZONE="UTC" \ GREENLET_TEST_CPP="no" -RUN apk update && apk add git gcc libc-dev libffi-dev openssl-dev wget &&\ +RUN apk update && apk add git gcc libc-dev libffi-dev openssl-dev wget postgresql-dev &&\ mkdir -p /etc/ihatemoney &&\ pip install --no-cache-dir gunicorn pymysql; COPY ./conf/entrypoint.sh /entrypoint.sh +COPY ./ /ihatemoney/ VOLUME /database EXPOSE 8000 diff --git a/conf/entrypoint.sh b/conf/entrypoint.sh index c1b7019..8fc10f5 100755 --- a/conf/entrypoint.sh +++ b/conf/entrypoint.sh @@ -38,7 +38,8 @@ if [ "$NIGHTLY" == "True" -o "$NIGHTLY" == "true" ]; then pip install --no-cache-dir -e /ihatemoney else # Get the latest release from PyPI. - pip install --no-cache-dir --upgrade ihatemoney + #pip install --no-cache-dir --upgrade ihatemoney + pip install --no-cache-dir -e /ihatemoney fi # Start gunicorn without forking diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2d2576a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3.8" +services: + ihatemoney: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + ports: + - 18000:8000 + environment: + SQLALCHEMY_DATABASE_URI: "postgresql://ihatemoney:ihatemoney@db/ihatemoney?client_encoding=utf8" + db: + image: postgres:13 + restart: unless-stopped + environment: + POSTGRES_USER: "ihatemoney" + POSTGRES_PASSWORD: "ihatemoney" + POSTGRES_DB: "ihatemoney" + PGDATA: "/var/lib/postgresql/data/pgdata" + volumes: + - ./db:/var/lib/postgresql/data/pgdata @@ -41,6 +41,7 @@ install_requires = requests~=2.22 SQLAlchemy-Continuum~=1.3 SQLAlchemy~=1.3.0 # New 1.4 changes API, see #728 + psycopg2-binary~=2.8 [options.extras_require] dev = |
