Merge branch 'main' of github.com:binwiederhier/ntfy into main
This commit is contained in:
		
						commit
						f6ffb393f8
					
				
					 2 changed files with 21 additions and 2 deletions
				
			
		
							
								
								
									
										15
									
								
								docker-compose.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								docker-compose.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					version: "2.1"
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  ntfy:
 | 
				
			||||||
 | 
					    image: binwiederhier/ntfy
 | 
				
			||||||
 | 
					    container_name: ntfy
 | 
				
			||||||
 | 
					    command:
 | 
				
			||||||
 | 
					      - serve
 | 
				
			||||||
 | 
					    user: UID:GID # optional. Set custom user/group or uid/gid
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - /var/cache/ntfy:/var/cache/ntfy
 | 
				
			||||||
 | 
					      - /etc/ntfy:/etc/ntfy
 | 
				
			||||||
 | 
					    ports:
 | 
				
			||||||
 | 
					      - 80:80
 | 
				
			||||||
 | 
					    restart: unless-stopped
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -239,17 +239,18 @@ docker run \
 | 
				
			||||||
    serve
 | 
					    serve
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
With other config options (configured via `/etc/ntfy/server.yml`, see [configuration](config.md) for details):
 | 
					With other config options and non-root user (configured via `/etc/ntfy/server.yml`, see [configuration](config.md) for details):
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
docker run \
 | 
					docker run \
 | 
				
			||||||
  -v /etc/ntfy:/etc/ntfy \
 | 
					  -v /etc/ntfy:/etc/ntfy \
 | 
				
			||||||
  -p 80:80 \
 | 
					  -p 80:80 \
 | 
				
			||||||
 | 
					  -u UID:GID \
 | 
				
			||||||
  -it \
 | 
					  -it \
 | 
				
			||||||
  binwiederhier/ntfy \
 | 
					  binwiederhier/ntfy \
 | 
				
			||||||
  serve
 | 
					  serve
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Using docker-compose:
 | 
					Using docker-compose with non-root user:
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
version: "2.1"
 | 
					version: "2.1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -259,6 +260,7 @@ services:
 | 
				
			||||||
    container_name: ntfy
 | 
					    container_name: ntfy
 | 
				
			||||||
    command:
 | 
					    command:
 | 
				
			||||||
      - serve
 | 
					      - serve
 | 
				
			||||||
 | 
					    user: UID:GID # optional. replace with your own user/group or uid/gid
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - /var/cache/ntfy:/var/cache/ntfy
 | 
					      - /var/cache/ntfy:/var/cache/ntfy
 | 
				
			||||||
      - /etc/ntfy:/etc/ntfy
 | 
					      - /etc/ntfy:/etc/ntfy
 | 
				
			||||||
| 
						 | 
					@ -267,6 +269,8 @@ services:
 | 
				
			||||||
    restart: unless-stopped
 | 
					    restart: unless-stopped
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If using a non-root user when running the docker version, be sure to chown the server.yml, user.db, and cache.db files to the same uid/gid.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Alternatively, you may wish to build a customized Docker image that can be run with fewer command-line arguments and without delivering the configuration file separately.
 | 
					Alternatively, you may wish to build a customized Docker image that can be run with fewer command-line arguments and without delivering the configuration file separately.
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
FROM binwiederhier/ntfy
 | 
					FROM binwiederhier/ntfy
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue