Skip to content

Commit

Permalink
'Changes to be committed:'
Browse files Browse the repository at this point in the history
    renamed:    src/.env.example -> .env.example
        - I think that's better env-file saving out off from container

    modified:   README.md
        - Added example how to run programm with the date flag

    modified:   compose.yaml
        - Added command to start programm with the date flag agument
        - Added database file volume
        - Added file with env variables

    modified:   src/Dockerfile
        - change cmd command to entrypoint
  • Loading branch information
SivikGosh committed Feb 3, 2024
1 parent f128913 commit 3df3ac1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ Chat messages listener and repply messages by target words.
сейчас docker образ весит 329MB

запуск скрипта: python main.py гггг-мм-дд

upd:
START_DATE=гггг-мм-дд docker compose up -d --build
5 changes: 4 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ services:
server:
build:
context: src/
env_file:
- ./.env
command: '$START_DATE'
volumes:
- D:/python_projects/docker_vol/DockerDesktopWSL/.env:/app/.env
- ./db.sqlite3:/app/db.sqlite3
2 changes: 1 addition & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ COPY . .
RUN pip install --upgrade pip \
pip install -r requirements.txt

CMD python main.py
ENTRYPOINT [ "python", "main.py" ]

0 comments on commit 3df3ac1

Please sign in to comment.