You've already forked focalboard
							
							
				mirror of
				https://github.com/mattermost/focalboard.git
				synced 2025-10-31 00:17:42 +02:00 
			
		
		
		
	Add Docker volume persistence (#159)
* Add persistence to the default Docker container This sets a default volume of `/data` for the Docker container. This allows for persistence when using the default SQLite database, and the option of mounting the volume to the host for backing up. * Add -v flag description Co-authored-by: Jesús Espino <jespinog@gmail.com>
This commit is contained in:
		| @@ -21,6 +21,8 @@ ARG PGID=2000 | ||||
|  | ||||
| EXPOSE 8000/tcp | ||||
|  | ||||
| VOLUME /data | ||||
|  | ||||
| RUN addgroup -g ${PGID} focalboard && \ | ||||
|     adduser -H -D -u ${PUID} -G focalboard focalboard | ||||
|  | ||||
| @@ -29,7 +31,7 @@ WORKDIR /opt/focalboard | ||||
| COPY --from=gobuild /go/focalboard/bin/linux/focalboard-server bin/ | ||||
| COPY --from=nodebuild /focalboard/webapp/pack pack/ | ||||
| COPY --from=nodebuild /focalboard/LICENSE.txt LICENSE.txt | ||||
| COPY --from=nodebuild /focalboard/server-config.json config.json | ||||
| COPY --from=nodebuild /focalboard/docker/server_config.json config.json | ||||
|  | ||||
| RUN chown -R ${PUID}:${PGID} /opt/focalboard | ||||
|  | ||||
|   | ||||
| @@ -6,9 +6,11 @@ The Dockerfile gives a quick and easy way to pull the latest Focalboard server a | ||||
|  | ||||
| ``` | ||||
| docker build -t focalboard . | ||||
| docker run -it -p 80:8000 focalboard | ||||
| docker run -it -v "/home/user/focalboard-data:/data" -p 80:8000 focalboard | ||||
| ``` | ||||
|  | ||||
| > The `-v` flag can be used to store Focalboard's database and uploaded files in a directory on the Docker host | ||||
|  | ||||
| Open a browser to http://localhost to start | ||||
|  | ||||
| ## Docker-Compose | ||||
|   | ||||
							
								
								
									
										16
									
								
								docker/server_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								docker/server_config.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| { | ||||
|   "serverRoot": "http://localhost:8000", | ||||
|   "port": 8000, | ||||
|   "dbtype": "sqlite3", | ||||
|   "dbconfig": "/data/focalboard.db", | ||||
|   "postgres_dbconfig": "dbname=focalboard sslmode=disable", | ||||
|   "useSSL": false, | ||||
|   "webpath": "./pack", | ||||
|   "filespath": "/data/files", | ||||
|   "telemetry": true, | ||||
|   "session_expire_time": 2592000, | ||||
|   "session_refresh_time": 18000, | ||||
|   "localOnly": false, | ||||
|   "enableLocalMode": true, | ||||
|   "localModeSocketLocation": "/var/tmp/focalboard_local.socket" | ||||
| } | ||||
		Reference in New Issue
	
	Block a user