Skip to content

Commit

Permalink
146 custom port mapping (#147)
Browse files Browse the repository at this point in the history
* Move port config to project

* Add newline after postgres messages

* Map PostgresPort and AirflowWebserverPort to standard 5432 and 8080; Remove AirflowWebserverPort exporsure and WEB_SERVER_PORT env var

* Move port to a nested webserver attribute
  • Loading branch information
Ben authored and andscoop committed Nov 21, 2018
1 parent da79ff3 commit 7e8d96a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion airflow/docker.go
Expand Up @@ -181,7 +181,7 @@ func Start(airflowHome string) error {
}
}
fmt.Printf(messages.COMPOSE_LINK_WEBSERVER+"\n", config.CFG.WebserverPort.GetString())
fmt.Printf(messages.COMPOSE_LINK_POSTGRES, config.CFG.PostgresPort.GetString())
fmt.Printf(messages.COMPOSE_LINK_POSTGRES+"\n", config.CFG.PostgresPort.GetString())
return nil
}

Expand Down
11 changes: 4 additions & 7 deletions airflow/include/composeyml.go
Expand Up @@ -26,7 +26,7 @@ services:
io.astronomer.docker: "true"
io.astronomer.docker.cli: "true"
ports:
- {{ .PostgresPort }}:{{ .PostgresPort }}
- {{ .PostgresPort }}:5432
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
Expand All @@ -48,7 +48,7 @@ services:
- postgres
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:{{ .PostgresPort }}
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw="
volumes:
Expand All @@ -72,15 +72,12 @@ services:
- scheduler
- postgres
environment:
AIRFLOW__WEBSERVER__WEB_SERVER_PORT: {{ .AirflowWebserverPort }}
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:{{ .PostgresPort }}
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw="
ports:
- {{ .AirflowWebserverPort }}:{{ .AirflowWebserverPort }}
expose:
- {{ .AirflowWebserverPort }}
- {{ .AirflowWebserverPort }}:8080
volumes:
- {{ .AirflowHome }}/dags:/usr/local/airflow/dags:ro
- {{ .AirflowHome }}/plugins:/usr/local/airflow/plugins:ro
Expand Down

0 comments on commit 7e8d96a

Please sign in to comment.