Feat: config pour déployer matrix
This commit is contained in:
		
							
								
								
									
										71
									
								
								matrix/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								matrix/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,71 @@ | ||||
| version: '3' | ||||
| services: | ||||
|   postgres: | ||||
|     image: "postgres:14.1" | ||||
|     restart: "unless-stopped" | ||||
|     environment: | ||||
|       POSTGRES_PASSWORD: "admin" | ||||
|     volumes: | ||||
|       - "./postgres/data:/var/lib/postgresql/data" | ||||
|       - ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql | ||||
|     networks: | ||||
|       - matrix | ||||
|  | ||||
|   redis: | ||||
|     image: "redis:latest" | ||||
|     restart: "unless-stopped" | ||||
|     networks: | ||||
|       - matrix | ||||
|  | ||||
|   synapse: | ||||
|     image: "matrixdotorg/synapse:latest" | ||||
|     restart: "unless-stopped" | ||||
|     environment: | ||||
|       SYNAPSE_CONFIG_DIR: "/data" | ||||
|       SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml" | ||||
|       UID: "1000" | ||||
|       GID: "1000" | ||||
|       TZ: "Europe/Paris" | ||||
|     volumes: | ||||
|       - "./synapse:/data" | ||||
|     labels: | ||||
|       - "traefik.enable=true" | ||||
|       - "traefik.http.services.synapse.loadbalancer.server.port=8008" | ||||
|       - "traefik.http.routers.synapse.rule=Host(`synapse.combava.lan`)" | ||||
|       - "traefik.http.routers.synapse.entrypoints=https" | ||||
|       - "traefik.http.routers.synapse.tls=true" | ||||
|     networks: | ||||
|       - gateway | ||||
|       - matrix | ||||
|  | ||||
|   nginx: | ||||
|     image: "nginx:latest" | ||||
|     restart: "unless-stopped" | ||||
|     volumes: | ||||
|       - "./nginx/matrix.conf:/etc/nginx/conf.d/matrix.conf" | ||||
|       - ./nginx/www:/var/www/ | ||||
|     labels: | ||||
|       - "traefik.enable=true" | ||||
|       - "traefik.http.routers.matrix.rule=Host(`matrix.combava.lan`)" | ||||
|       - "traefik.http.routers.matrix.entrypoints=https" | ||||
|       - "traefik.http.routers.matrix.tls=true" | ||||
|     networks: | ||||
|       - gateway | ||||
|  | ||||
|   element: | ||||
|     image: "vectorim/element-web:latest" | ||||
|     volumes: | ||||
|       - "./element/config.json:/app/config.json:ro" | ||||
|     labels: | ||||
|       - "traefik.enable=true" | ||||
|       - "traefik.http.services.element.loadbalancer.server.port=80" | ||||
|       - "traefik.http.routers.element.rule=Host(`element.combava.lan`)" | ||||
|       - "traefik.http.routers.element.entrypoints=https" | ||||
|       - "traefik.http.routers.element.tls=true" | ||||
|     networks: | ||||
|       - gateway | ||||
|  | ||||
| networks: | ||||
|   matrix: | ||||
|   gateway: | ||||
|     external: true | ||||
							
								
								
									
										18
									
								
								matrix/nginx/matrix.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								matrix/nginx/matrix.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| server { | ||||
|   listen         80 default_server; | ||||
|   server_name    matrix.combava.lan; | ||||
|  | ||||
|  # Traefik -> nginx -> synapse | ||||
|  location /_matrix { | ||||
|     proxy_pass http://synapse:8008; | ||||
|     proxy_set_header X-Forwarded-For $remote_addr; | ||||
|     client_max_body_size 128m; | ||||
|   } | ||||
|  | ||||
|   location /.well-known/matrix/ { | ||||
|     root /var/www/; | ||||
|     default_type application/json; | ||||
|     add_header Access-Control-Allow-Origin  *; | ||||
|   } | ||||
| } | ||||
|  | ||||
							
								
								
									
										5
									
								
								matrix/postgres/init.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								matrix/postgres/init.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| CREATE ROLE synapse; | ||||
| ALTER ROLE synapse WITH PASSWORD 'password'; | ||||
| ALTER ROLE synapse WITH LOGIN; | ||||
| CREATE DATABASE synapse ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER synapse; | ||||
| GRANT ALL PRIVILEGES ON DATABASE synapse TO synapse; | ||||
							
								
								
									
										2704
									
								
								matrix/synapse/homeserver.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2704
									
								
								matrix/synapse/homeserver.yaml
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user