diff --git a/.dockerignore b/.dockerignore index 966c48f..bddb8f6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,12 @@ -# Ignore cache files +# Ignore everything +* + +# Except code +!/src/ +!/deploy/docker-entrypoint.sh +!/pyproject.toml +!/poetry.lock +!/logging.yaml + +# And ignore cache files in the code __pycache__ diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 1ef2930..16357cf 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -55,7 +55,7 @@ RUN chmod +x /docker-entrypoint.sh RUN groupadd -g 1500 poetry && \ useradd -m -u 1500 -g poetry poetry -COPY --chown=poetry:poetry ./src /code/src +COPY --chown=poetry:poetry . /code USER poetry WORKDIR /code diff --git a/docker-compose.yml b/docker-compose.yml index 3d38382..03f9095 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,8 @@ services: depends_on: - redis restart: always - env_file: .env + volumes: + - ./settings.yaml:/code/settings.yaml networks: - default - music-room