Move additional files into dedicated folder and make build the def...
...fault in the compose files.
This commit is contained in:
		
							parent
							
								
									31c725660f
								
							
						
					
					
						commit
						7288010e55
					
				
					 5 changed files with 48 additions and 45 deletions
				
			
		|  | @ -4,7 +4,7 @@ | |||
| 
 | ||||
| 
 | ||||
| ##########################  BUILD IMAGE  ########################## | ||||
| # Alpine build image to build Conduits statically compiled binary | ||||
| # Alpine build image to build Conduit's statically compiled binary | ||||
| FROM alpine:3.12 as builder | ||||
| 
 | ||||
| # Specifies if the local project is build or if Conduit gets build | ||||
|  | @ -51,7 +51,7 @@ LABEL org.opencontainers.image.created=${CREATED} \ | |||
|       org.opencontainers.image.vendor="Conduit Contributors" \ | ||||
|       org.opencontainers.image.description="A Matrix homeserver written in Rust" \ | ||||
|       org.opencontainers.image.url="https://conduit.rs/" \ | ||||
|       org.opencontainers.image.revision=$GIT_REF \ | ||||
|       org.opencontainers.image.revision=${GIT_REF} \ | ||||
|       org.opencontainers.image.source="https://git.koesters.xyz/timo/conduit.git" \ | ||||
|       org.opencontainers.image.documentation.="" \ | ||||
|       org.opencontainers.image.licenses="AGPL-3.0" \ | ||||
|  |  | |||
|  | @ -1,21 +0,0 @@ | |||
| # Conduit - Traefik Reverse Proxy Labels | ||||
| version: '3' | ||||
| 
 | ||||
| services: | ||||
|     homeserver: | ||||
|         labels: | ||||
|             - "traefik.enable=true" | ||||
|             - "traefik.docker.network=proxy"  # Change this to the name of your Traefik docker proxy network | ||||
| 
 | ||||
|             - "traefik.http.routers.to-conduit.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)"  # Change to the address on which Conduit is hosted | ||||
|             - "traefik.http.routers.to-conduit.tls=true" | ||||
|             - "traefik.http.routers.to-conduit.tls.certresolver=letsencrypt" | ||||
| 
 | ||||
|     element-web: | ||||
|         labels: | ||||
|             - "traefik.enable=true" | ||||
|             - "traefik.docker.network=proxy"  # Change this to the name of your Traefik docker proxy network | ||||
| 
 | ||||
|             - "traefik.http.routers.to-element-web.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)"  # Change to the address on which Element-Web is hosted | ||||
|             - "traefik.http.routers.to-element-web.tls=true" | ||||
|             - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt" | ||||
|  | @ -3,17 +3,18 @@ version: '3' | |||
| 
 | ||||
| services: | ||||
|     homeserver: | ||||
|         ### If you already built the Conduit image with 'docker build', then you are ready to | ||||
|         ### go. Otherwise, you need to comment the 'image' line and uncomment the 'build' lines | ||||
|         ### and run: CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d | ||||
|         image: conduit_homeserver:latest | ||||
|         # build: | ||||
|         #     context: . | ||||
|         #     args: | ||||
|         #         CREATED: | ||||
|         #         VERSION: | ||||
|         #         LOCAL: "false" | ||||
|         #         GIT_REF: HEAD | ||||
|         ### If you already built the Conduit image with 'docker build', then you can uncomment the | ||||
|         ### 'image' line and comment out the 'build' option. | ||||
|         # image: conduit_homeserver:latest | ||||
|         ### If you want meaningful labels in you built Conduit image, you should run docker-compose like this: | ||||
|         ### CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d | ||||
|         build: | ||||
|             context: . | ||||
|             args: | ||||
|                 CREATED: | ||||
|                 VERSION: | ||||
|                 LOCAL: "false" | ||||
|                 GIT_REF: HEAD | ||||
|         restart: unless-stopped | ||||
|         ports: | ||||
|             - 8448:8000 | ||||
|  |  | |||
							
								
								
									
										22
									
								
								docker/docker-compose.override.traefik.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docker/docker-compose.override.traefik.yml
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| # Conduit - Traefik Reverse Proxy Labels | ||||
| version: '3' | ||||
| 
 | ||||
| services: | ||||
|     homeserver: | ||||
|         labels: | ||||
|             - "traefik.enable=true" | ||||
|             - "traefik.docker.network=proxy"  # Change this to the name of your Traefik docker proxy network | ||||
| 
 | ||||
|             - "traefik.http.routers.to-conduit.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)"  # Change to the address on which Conduit is hosted | ||||
|             - "traefik.http.routers.to-conduit.tls=true" | ||||
|             - "traefik.http.routers.to-conduit.tls.certresolver=letsencrypt" | ||||
| 
 | ||||
|     ### Uncomment this if you uncommented Element-Web App in the docker-compose.yml | ||||
|     # element-web: | ||||
|     #     labels: | ||||
|     #         - "traefik.enable=true" | ||||
|     #         - "traefik.docker.network=proxy"  # Change this to the name of your Traefik docker proxy network | ||||
| 
 | ||||
|     #         - "traefik.http.routers.to-element-web.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)"  # Change to the address on which Element-Web is hosted | ||||
|     #         - "traefik.http.routers.to-element-web.tls=true" | ||||
|     #         - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt" | ||||
|  | @ -3,17 +3,18 @@ version: '3' | |||
| 
 | ||||
| services: | ||||
|     homeserver: | ||||
|         ### If you already built the Conduit image with 'docker build', then you are ready to | ||||
|         ### go. Otherwise, you need to comment the 'image' line and uncomment the 'build' lines | ||||
|         ### and run: CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d | ||||
|         image: conduit_homeserver:latest | ||||
|         # build: | ||||
|         #     context: . | ||||
|         #     args: | ||||
|         #         CREATED: | ||||
|         #         VERSION: | ||||
|         #         LOCAL: false | ||||
|         #         GIT_REF: HEAD | ||||
|         ### If you already built the Conduit image with 'docker build', then you can uncomment the | ||||
|         ### 'image' line and comment out the 'build' option. | ||||
|         # image: conduit_homeserver:latest | ||||
|         ### If you want meaningful labels in you built Conduit image, you should run docker-compose like this: | ||||
|         ### CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d | ||||
|         build: | ||||
|             context: . | ||||
|             args: | ||||
|                 CREATED: | ||||
|                 VERSION: | ||||
|                 LOCAL: false | ||||
|                 GIT_REF: HEAD | ||||
|         restart: unless-stopped | ||||
|         volumes: | ||||
|             - db:/srv/conduit/.local/share/conduit | ||||
		Loading…
	
		Reference in a new issue