Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Prebuilt Docker image #32

Open
petrleocompel opened this issue May 19, 2022 · 4 comments
Open

Prebuilt Docker image #32

petrleocompel opened this issue May 19, 2022 · 4 comments

Comments

@petrleocompel
Copy link
Contributor

For further use docker images would be amazing (that we do not have to build each version on our machnies).

So I made an example (even with 2 containers - better than nothing) in fork https://github.com/petrleocompel/Pckd

Result = 2 images
https://hub.docker.com/r/petrleocompel/pckd-client
https://hub.docker.com/r/petrleocompel/pckd-server

Used Github Actions + 2 Actions secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.
How to make a DockerHub token -> https://docs.docker.com/docker-hub/access-tokens/

I can make a pull request (only thing to tweak is change name of docker images).

Otherwise it is done.

@petrleocompel
Copy link
Contributor Author

My tweaked yaml after that

version: "3"

services:
  server:
    image: petrleocompel/pckd-server
    volumes:
      - ./logs:/home/node/app/logs
    environment:
      - DATABASE_URL=postgresql://postgres:postgres@db/pckd
      - DATABASE_TYPE=postgres
      - JWT_SECRET= verysecurestring
      - IPREGISTRY_API_KEY=f1ntkcjoqaazglj7
    depends_on:
      - db

  frontend:
    image: petrleocompel/pckd-client
    ports:
      - 80:80
    environment:
      - BACKEND_URL=http://server:4000

  db:
    image: postgres:13-alpine
    volumes:
      - ./db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=pckd

@Just-Moh-it
Copy link
Owner

Thanks a lot for the contribution. This has been merged in #33 🎉

@Just-Moh-it
Copy link
Owner

Currently having some problems with the docker login... A fix for later

@Just-Moh-it Just-Moh-it reopened this May 19, 2022
@petrleocompel
Copy link
Contributor Author

Should not be that hard to fix this -> just go by this guide https://github.com/docker/login-action#docker-hub -> https://docs.docker.com/docker-hub/access-tokens/#create-an-access-token

Create token on https://hub.docker.com/settings/security

And define on https://github.com/PckdHQ/Pckd/settings/secrets/actions those secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.

We should be good to go 🥳

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants