-
-
Save ruilvo/c6b82e447ad46abb7e8c22a8702ec62e to your computer and use it in GitHub Desktop.
Docker static HTML + SFTP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SFTP_USERS=SOME_USER:SOME_PW:1001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| webserver: | |
| image: nginx:latest | |
| container_name: nginx_server | |
| ports: | |
| - "127.0.0.1:9109:80" # Bind to localhost and port 9109 | |
| volumes: | |
| - html:/usr/share/nginx/html:rw | |
| restart: always | |
| sftp: | |
| image: atmoz/sftp:latest | |
| container_name: sftp_server | |
| ports: | |
| - "2222:22" # SFTP server listens on port 2222 | |
| volumes: | |
| - sftp-data:/home/user/upload | |
| - html:/usr/share/nginx/html | |
| environment: | |
| SFTP_USERS: ${SFTP_USERS} # Read credentials from the .env file | |
| restart: always | |
| volumes: | |
| html: | |
| sftp-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment