Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/54 git workflow #71

Merged
merged 10 commits into from
Dec 22, 2021
Merged

Issue/54 git workflow #71

merged 10 commits into from
Dec 22, 2021

Conversation

mairead
Copy link
Contributor

@mairead mairead commented Dec 15, 2021

Adopt new worfklow

  • updated makefile
  • updated dockerfile
  • updated entrypoint
  • updated env config to remove vars from dockerfile
  • add items to gitignore and dockerignore

Mairead Preece added 2 commits December 15, 2021 15:24
subrepo:
  subdir:   ".github/workflows"
  merged:   "a31bc88"
upstream:
  origin:   "[email protected]:epimorphics/github-workflows.git"
  branch:   "hmlr"
  commit:   "a31bc88"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
Copy link
Contributor

@andrew-pickin-epi andrew-pickin-epi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes requested but nothing that should require another review.

**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
.dockerignore
.git/
.github/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.dockeringnore present twice as .dockerfile and **/.dockerignore looks a bit inconsistent when you're not doing the same for, say, .gitignore.
More significantly Makefile missing

Dockerfile Outdated

RUN apk add --update build-base

LABEL Name=lrlanding version=${APP_VERSION}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete line 20.
We don't use image labels, when we do the don't use NAME, the name isn't lrlanding, and APP_VERSION isn't set anywhere.

@@ -5,9 +5,6 @@ deployments:
- tag: "v{ver}"
deploy: "prod"
publish: "prod"
- tag: "v{ver}-rc"
deploy: "preprod"
publish: "preprod"
- branch: "dev-infrastructure"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be just dev?

@ijdickinson
Copy link
Contributor

I built the image locally with make image, which seems to have worked OK. But it won't run:

[~/projects/hmlr/lr-landing]  (issue/54-git-workflow)
ian@alder $ docker image ls
REPOSITORY                                                                TAG                IMAGE ID       CREATED             SIZE
173681544495.dkr.ecr.eu-west-1.amazonaws.com/epimorphics/lr-landing/dev   1.5.6-2a2fe4a      278bf2d2756d   About an hour ago   555MB
<none>                                                                    <none>             b221bbcc3c3e   About an hour ago   573MB
ruby                                                                      2.6.6-alpine3.10   ca7ab3efe843   20 months ago       48.8MB
[~/projects/hmlr/lr-landing]  (issue/54-git-workflow)
ian@alder $ make run
Error response from daemon: No such container: lr_landing
make: [Makefile:69: run] Error 1 (ignored)
Error: No such container: lr_landing
make: [Makefile:70: run] Error 1 (ignored)
sh: can't open '/app/entrypoint.sh': Not a directory
make: *** [Makefile:71: run] Error 2
[~/projects/hmlr/lr-landing]  (issue/54-git-workflow)

Just running the image directly with docker has the same problem with the entrypoint:

[~/projects/hmlr/lr-landing]  (issue/54-git-workflow)
ian@alder $ docker run 278bf2d2756d
sh: can't open '/app/entrypoint.sh': Not a directory

@ijdickinson
Copy link
Contributor

Update on this: if I change line 46 of the Dockerfile to:

COPY entrypoint.sh /app/entrypoint.sh

the image will run. But then it hits another error:

[~/projects/hmlr/lr-landing]  (issue/54-git-workflow)
ian@alder $ make run
Error response from daemon: No such container: lr_landing
make: [Makefile:69: run] Error 1 (ignored)
Error: No such container: lr_landing
make: [Makefile:70: run] Error 1 (ignored)
mkdir: can't create directory './tmp': Permission denied
make: *** [Makefile:71: run] Error 1

@ijdickinson
Copy link
Contributor

I had to make two more changes to get the make run to work for me:

  • line 42 in Dockerfile:
    COPY --from=builder --chown=app /usr/src/app .

  • line 20 in entrypoint.sh: remove spaces around :-

Copy link
Contributor

@ijdickinson ijdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the minor changes I added in earlier comments, this is working locally (with a simple proxy so that it mimics the /app/root deployment). Ltgm 👍

@mairead mairead merged commit ff0e653 into dev-infrastructure Dec 22, 2021
@joescottdave joescottdave deleted the issue/54-git-workflow branch August 23, 2022 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants