You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-08-08 22:36:41 +02:00
fix docker files
This commit is contained in:
@ -98,7 +98,7 @@ func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCrede
|
|||||||
// it will fail to create appropriate resources for the account of the forked user.
|
// it will fail to create appropriate resources for the account of the forked user.
|
||||||
if cfg.ProjectName == "saas-starter-kit" {
|
if cfg.ProjectName == "saas-starter-kit" {
|
||||||
remoteUser := gitRemoteUser(modDetails.ProjectRoot)
|
remoteUser := gitRemoteUser(modDetails.ProjectRoot)
|
||||||
|
|
||||||
// Its a true fork from the origin repo.
|
// Its a true fork from the origin repo.
|
||||||
if remoteUser != "oss" {
|
if remoteUser != "oss" {
|
||||||
// Replace the prefix 'saas' with the parent directory name, hopefully the gitlab group/username.
|
// Replace the prefix 'saas' with the parent directory name, hopefully the gitlab group/username.
|
||||||
|
@ -152,6 +152,8 @@ func NewService(serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectSe
|
|||||||
ServiceHostPrimary: ctx.ServiceHostPrimary,
|
ServiceHostPrimary: ctx.ServiceHostPrimary,
|
||||||
ServiceHostNames: ctx.ServiceHostNames,
|
ServiceHostNames: ctx.ServiceHostNames,
|
||||||
ReleaseTag: ctx.ReleaseTag,
|
ReleaseTag: ctx.ReleaseTag,
|
||||||
|
|
||||||
|
DockerBuildArgs: make(map[string]string),
|
||||||
}
|
}
|
||||||
|
|
||||||
if srv.DockerBuildDir == "" {
|
if srv.DockerBuildDir == "" {
|
||||||
@ -589,6 +591,9 @@ func NewService(serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectSe
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
srv.DockerBuildArgs["swagInit"] = "1"
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, errors.Wrapf(devdeploy.ErrInvalidService,
|
return nil, errors.Wrapf(devdeploy.ErrInvalidService,
|
||||||
"No service context defined for service '%s'",
|
"No service context defined for service '%s'",
|
||||||
|
@ -33,7 +33,8 @@ RUN go get github.com/pilu/fresh
|
|||||||
|
|
||||||
FROM build_base_golang AS dev
|
FROM build_base_golang AS dev
|
||||||
|
|
||||||
ARG service
|
ARG name
|
||||||
|
ARG code_path=./cmd/${name}
|
||||||
ARG commit_ref=-
|
ARG commit_ref=-
|
||||||
ARG swagInit
|
ARG swagInit
|
||||||
|
|
||||||
@ -41,9 +42,9 @@ ARG swagInit
|
|||||||
COPY internal ./internal
|
COPY internal ./internal
|
||||||
|
|
||||||
# Copy cmd specific packages.
|
# Copy cmd specific packages.
|
||||||
COPY cmd/${service} ./cmd/${service}
|
COPY ${code_path} ${code_path}
|
||||||
COPY cmd/${service}/templates /templates
|
COPY ${code_path}/templates /templates
|
||||||
#COPY cmd/${service}/static /static
|
#COPY ${code_path}/static /static
|
||||||
|
|
||||||
# Copy the global templates.
|
# Copy the global templates.
|
||||||
ADD resources/templates/shared /templates/shared
|
ADD resources/templates/shared /templates/shared
|
||||||
@ -51,7 +52,7 @@ ADD configs/fresh-auto-reload.conf /runner.conf
|
|||||||
|
|
||||||
ENV TEMPLATE_DIR=/templates
|
ENV TEMPLATE_DIR=/templates
|
||||||
|
|
||||||
WORKDIR ./cmd/${service}
|
WORKDIR ${code_path}
|
||||||
|
|
||||||
ENTRYPOINT ["fresh", "-c", "/runner.conf"]
|
ENTRYPOINT ["fresh", "-c", "/runner.conf"]
|
||||||
|
|
||||||
@ -76,8 +77,8 @@ ENV TEMPLATE_DIR=/templates
|
|||||||
ENV SHARED_TEMPLATE_DIR=/templates/shared
|
ENV SHARED_TEMPLATE_DIR=/templates/shared
|
||||||
#ENV STATIC_DIR=/static
|
#ENV STATIC_DIR=/static
|
||||||
|
|
||||||
ARG service
|
ARG name
|
||||||
ENV SERVICE_NAME $service
|
ENV SERVICE_NAME $name
|
||||||
|
|
||||||
ARG env="dev"
|
ARG env="dev"
|
||||||
ENV ENV $env
|
ENV ENV $env
|
||||||
|
@ -17,16 +17,17 @@ RUN go get github.com/pilu/fresh
|
|||||||
|
|
||||||
FROM build_base_golang AS dev
|
FROM build_base_golang AS dev
|
||||||
|
|
||||||
ARG service
|
ARG name
|
||||||
|
ARG code_path=./cmd/${name}
|
||||||
ARG commit_ref=-
|
ARG commit_ref=-
|
||||||
|
|
||||||
# Copy shared packages.
|
# Copy shared packages.
|
||||||
COPY internal ./internal
|
COPY internal ./internal
|
||||||
|
|
||||||
# Copy cmd specific packages.
|
# Copy cmd specific packages.
|
||||||
COPY cmd/${service} ./cmd/${service}
|
COPY ${code_path} ${code_path}
|
||||||
COPY cmd/${service}/templates /templates
|
COPY ${code_path}/templates /templates
|
||||||
COPY cmd/${service}/static /static
|
COPY ${code_path}/static /static
|
||||||
|
|
||||||
# Copy the global templates.
|
# Copy the global templates.
|
||||||
ADD resources/templates/shared /templates/shared
|
ADD resources/templates/shared /templates/shared
|
||||||
@ -34,7 +35,7 @@ ADD configs/fresh-auto-reload.conf /runner.conf
|
|||||||
|
|
||||||
ENV TEMPLATE_DIR=/templates
|
ENV TEMPLATE_DIR=/templates
|
||||||
|
|
||||||
WORKDIR ./cmd/${service}
|
WORKDIR ${code_path}
|
||||||
|
|
||||||
ENTRYPOINT ["fresh", "-c", "/runner.conf"]
|
ENTRYPOINT ["fresh", "-c", "/runner.conf"]
|
||||||
|
|
||||||
@ -55,8 +56,8 @@ ENV TEMPLATE_DIR=/templates
|
|||||||
ENV SHARED_TEMPLATE_DIR=/templates/shared
|
ENV SHARED_TEMPLATE_DIR=/templates/shared
|
||||||
ENV STATIC_DIR=/static
|
ENV STATIC_DIR=/static
|
||||||
|
|
||||||
ARG service
|
ARG name
|
||||||
ENV SERVICE_NAME $service
|
ENV SERVICE_NAME $name
|
||||||
|
|
||||||
ARG env="dev"
|
ARG env="dev"
|
||||||
ENV ENV $env
|
ENV ENV $env
|
||||||
|
Reference in New Issue
Block a user