Skip to content

Commit

Permalink
fixed volume and postgres container naming convention in docker compo…
Browse files Browse the repository at this point in the history
…se (#482)
  • Loading branch information
neel-astro committed Jan 20, 2022
1 parent 2cb8531 commit 276f89a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func generateConfig(projectName, airflowHome, envFile string, imageLabels map[st
AirflowWebserverPort: config.CFG.WebserverPort.GetString(),
AirflowEnvFile: envFile,
MountLabel: "z",
ProjectName: projectName,
ProjectName: sanitizeRepoName(projectName),
TriggererEnabled: triggererEnabled,
SchedulerContainerName: config.CFG.SchedulerContainerName.GetString(),
WebserverContainerName: config.CFG.WebserverContainerName.GetString(),
Expand Down
3 changes: 3 additions & 0 deletions airflow/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ networks:
volumes:
postgres_data:
driver: local
name: test-project-name_postgres_data
airflow_logs:
driver: local
name: test-project-name_airflow_logs
services:
postgres:
image: postgres:12.2
container_name: test-project-name-postgres
restart: unless-stopped
networks:
- airflow
Expand Down
3 changes: 3 additions & 0 deletions airflow/include/composeyml.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ networks:
volumes:
postgres_data:
driver: local
name: {{ .ProjectName }}_postgres_data
airflow_logs:
driver: local
name: {{ .ProjectName }}_airflow_logs
services:
postgres:
image: postgres:12.2
container_name: {{ .ProjectName }}-postgres
restart: unless-stopped
networks:
- airflow
Expand Down

0 comments on commit 276f89a

Please sign in to comment.