| 
									
										
										
										
											2018-05-20 13:02:29 +00:00
										 |  |  | ---
 | 
					
						
							|  |  |  | version: '3'
 | 
					
						
							| 
									
										
										
										
											2018-06-17 08:20:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # In order to set configuration, please use a .env file in
 | 
					
						
							|  |  |  | # your compose project directory (the same directory as your
 | 
					
						
							|  |  |  | # docker-compose.yml), and set database options, application
 | 
					
						
							|  |  |  | # name, key, and other settings there.
 | 
					
						
							|  |  |  | # A list of available settings is available in .env.example
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # The services should scale properly across a swarm cluster
 | 
					
						
							|  |  |  | # if the volumes are properly shared between cluster members.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-20 13:02:29 +00:00
										 |  |  | services:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  | ## App and Worker
 | 
					
						
							| 
									
										
										
										
											2018-06-17 08:20:21 +00:00
										 |  |  |   app:
 | 
					
						
							| 
									
										
										
										
											2019-04-22 02:40:32 +00:00
										 |  |  |     # Comment to use dockerhub image
 | 
					
						
							| 
									
										
										
										
											2019-11-01 17:59:13 +00:00
										 |  |  |     build:
 | 
					
						
							|  |  |  |       context: .
 | 
					
						
							|  |  |  |       dockerfile: contrib/docker/Dockerfile.apache
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  |     image: pixelfed
 | 
					
						
							| 
									
										
										
										
											2019-06-03 02:53:13 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							| 
									
										
										
										
											2018-06-17 08:20:21 +00:00
										 |  |  |     env_file:
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |       - .env.docker
 | 
					
						
							| 
									
										
										
										
											2018-05-20 13:02:29 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |       - app-storage:/var/www/storage
 | 
					
						
							|  |  |  |       - app-bootstrap:/var/www/bootstrap
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2018-06-16 20:31:16 +00:00
										 |  |  |       - external
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  |       - internal
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |     ports:
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |       - "8080:80"
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |     depends_on:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:52:05 +00:00
										 |  |  |       - db
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |       - redis
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |   worker:
 | 
					
						
							| 
									
										
										
										
											2019-11-01 17:59:13 +00:00
										 |  |  |     build:
 | 
					
						
							|  |  |  |       context: .
 | 
					
						
							|  |  |  |       dockerfile: contrib/docker/Dockerfile.apache
 | 
					
						
							| 
									
										
										
										
											2019-04-22 02:40:32 +00:00
										 |  |  |     image: pixelfed
 | 
					
						
							| 
									
										
										
										
											2019-06-03 02:53:13 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							| 
									
										
										
										
											2019-04-22 02:40:32 +00:00
										 |  |  |     env_file:
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |       - .env.docker
 | 
					
						
							| 
									
										
										
										
											2019-04-22 02:40:32 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |       - app-storage:/var/www/storage
 | 
					
						
							|  |  |  |       - app-bootstrap:/var/www/bootstrap
 | 
					
						
							| 
									
										
										
										
											2019-04-22 02:40:32 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |       - external
 | 
					
						
							| 
									
										
										
										
											2019-04-22 02:40:32 +00:00
										 |  |  |       - internal
 | 
					
						
							|  |  |  |     command: gosu www-data php artisan horizon
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |     depends_on:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:52:05 +00:00
										 |  |  |       - db
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |       - redis
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## DB and Cache
 | 
					
						
							| 
									
										
										
										
											2018-06-17 08:20:21 +00:00
										 |  |  |   db:
 | 
					
						
							| 
									
										
										
										
											2019-04-26 06:31:06 +00:00
										 |  |  |     image: mysql:8.0
 | 
					
						
							| 
									
										
										
										
											2019-06-03 02:53:13 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  |     networks:
 | 
					
						
							|  |  |  |       - internal
 | 
					
						
							| 
									
										
										
										
											2019-11-01 18:01:40 +00:00
										 |  |  |     command: --default-authentication-plugin=mysql_native_password
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |     env_file:
 | 
					
						
							|  |  |  |       - .env.docker
 | 
					
						
							| 
									
										
										
										
											2018-05-20 13:02:29 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2018-06-17 08:20:21 +00:00
										 |  |  |       - "db-data:/var/lib/mysql"
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-20 13:02:29 +00:00
										 |  |  |   redis:
 | 
					
						
							| 
									
										
										
										
											2019-04-18 14:23:47 +00:00
										 |  |  |     image: redis:5-alpine
 | 
					
						
							| 
									
										
										
										
											2019-06-03 02:53:13 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							| 
									
										
										
										
											2021-01-27 19:44:14 +00:00
										 |  |  |     env_file:
 | 
					
						
							|  |  |  |       - .env.docker
 | 
					
						
							| 
									
										
										
										
											2018-05-20 13:02:29 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  |       - "redis-data:/data"
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - internal
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | volumes:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:50:08 +00:00
										 |  |  |   db-data:
 | 
					
						
							|  |  |  |   redis-data:
 | 
					
						
							| 
									
										
										
										
											2018-06-17 08:20:21 +00:00
										 |  |  |   app-storage:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:48:02 +00:00
										 |  |  |   app-bootstrap:
 | 
					
						
							| 
									
										
										
										
											2018-05-31 19:43:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | networks:
 | 
					
						
							|  |  |  |   internal:
 | 
					
						
							|  |  |  |     internal: true
 | 
					
						
							|  |  |  |   external:
 | 
					
						
							| 
									
										
										
										
											2020-04-11 15:50:08 +00:00
										 |  |  |     driver: bridge
 |