| 
									
										
										
										
											2021-03-20 23:09:50 +00:00
										 |  |  | #!/usr/bin/sh
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-14 15:40:14 +00:00
										 |  |  | if [ "${LE_CERT}" -ne 0 ]; then | 
					
						
							| 
									
										
										
										
											2021-04-01 13:17:25 +00:00
										 |  |  |     cat <<EOF | 
					
						
							| 
									
										
										
										
											2021-03-20 23:09:50 +00:00
										 |  |  |     php: | 
					
						
							|  |  |  |         build: docker/php | 
					
						
							|  |  |  | EOF | 
					
						
							| 
									
										
										
										
											2021-04-01 13:17:25 +00:00
										 |  |  | else | 
					
						
							|  |  |  |     cat <<EOF | 
					
						
							|  |  |  |     php: | 
					
						
							|  |  |  |         image: gsocial/php | 
					
						
							|  |  |  | EOF | 
					
						
							|  |  |  | fi | 
					
						
							| 
									
										
										
										
											2021-03-20 23:09:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # If the user wants a DB docker container | 
					
						
							|  |  |  | if echo "${DOCKER}" | grep -Fvq '"db"'; then | 
					
						
							|  |  |  |     cat <<EOF | 
					
						
							|  |  |  |         depends_on: | 
					
						
							|  |  |  |             - db | 
					
						
							|  |  |  | EOF | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cat <<EOF | 
					
						
							|  |  |  |         restart: always | 
					
						
							|  |  |  |         tty: true | 
					
						
							|  |  |  |         ports: | 
					
						
							|  |  |  |             - ${PHP_PORT}:9000 | 
					
						
							|  |  |  |         volumes: | 
					
						
							|  |  |  |             # Entrypoint | 
					
						
							|  |  |  |             - ./docker/php/entrypoint.sh:/entrypoint.sh | 
					
						
							|  |  |  |             - ./docker/db/wait_for_db.sh:/wait_for_db.sh | 
					
						
							|  |  |  |             - ./docker/social/install.sh:/var/entrypoint.d/social_install.sh | 
					
						
							|  |  |  |             # Main files | 
					
						
							|  |  |  |             - .:/var/www/social | 
					
						
							| 
									
										
										
										
											2021-09-09 00:40:34 +01:00
										 |  |  |             - /var/www/social/docker # exclude docker folder | 
					
						
							| 
									
										
										
										
											2021-03-20 23:09:50 +00:00
										 |  |  |         env_file: | 
					
						
							|  |  |  |             - ./docker/social/social.env | 
					
						
							|  |  |  |             - ./docker/db/db.env | 
					
						
							|  |  |  |         command: /entrypoint.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | EOF |