[GH-ISSUE #399] Question : nginx-wsgi-flask -> compose.yaml #5406

Closed
opened 2026-04-26 17:49:16 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Foundsheep on GitHub (Oct 31, 2023).
Original GitHub issue: https://github.com/docker/awesome-compose/issues/399

Hi there,

In case someone wants to use a volume to gather logs from the services like me, could we change the script as follows and won't there be any problems, or could I just write another line in the volume section?

/nginx/Dockerfile

...
COPY --chown=nginx:nginx start.sh /app/start.sh
COPY --chown=nginx:nginx default.conf /tmp/default.conf  # line added
...

compose.yaml

services:
  nginx-proxy:
    ...
    volumes:
      - <my-volume-name>:<location-to-logs>  # replaced ./nginx/default.conf:/tmp/default.conf
...
volume:
  <my-volume-name>:
Originally created by @Foundsheep on GitHub (Oct 31, 2023). Original GitHub issue: https://github.com/docker/awesome-compose/issues/399 Hi there, In case someone wants to use a volume to gather logs from the services like me, could we change the script as follows and won't there be any problems, or could I just write another line in the volume section? **/nginx/Dockerfile** ```Dockerfile ... COPY --chown=nginx:nginx start.sh /app/start.sh COPY --chown=nginx:nginx default.conf /tmp/default.conf # line added ... ``` **compose.yaml** ```yaml services: nginx-proxy: ... volumes: - <my-volume-name>:<location-to-logs> # replaced ./nginx/default.conf:/tmp/default.conf ... volume: <my-volume-name>: ```
Author
Owner

@Foundsheep commented on GitHub (Nov 1, 2023):

I found the answer myself.
Basically, I could have two lines in compose.yaml's volumes section

<!-- gh-comment-id:1788580885 --> @Foundsheep commented on GitHub (Nov 1, 2023): I found the answer myself. Basically, I could have two lines in `compose.yaml`'s volumes section
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-compose#5406