• 우연히 Mattermost 라는 solution을 알게됨
  • slack의 alternative가 될 수 있어 보임
  • 50인 이하, private network에서 동작 시 free로 사용 가능함
  • DB는 postgresql을 사용함
  • 여러 방법으로 설치가 가능하여 Docker 에 설치해 봄
  • https://docs.mattermost.com/install/install-docker.html
 

Deploy Mattermost via Docker - Mattermost documentation

Previous Install Mattermost Server on Ubuntu

docs.mattermost.com

 

  • github 에서 Docker 관련 파일들 clone 이후 약간의 추가 작업 필요함
    • .env 파일 생성
    • .env 약간 수정
    • 8065 포트만 forwarding을 해도 될 것도 같고... 귀찮아서 더이상은 안해봄
root@Ubuntu24:~/repos/mattermost-docker# git diff
diff --git a/docker-compose.yml b/docker-compose.yml
index dfdf345..9f3122d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -59,6 +59,11 @@ services:
 
       # additional settings
       - MM_SERVICESETTINGS_SITEURL
+    ports:
+      - "8065:8065"
+      - "8443:8443"
+      - "80:80"
+      - "443:443"

 

  • ServerIp:8065로 접속해서 기본 설정하니 잘 동작됨
  • 최초 접속 화면

 

  • 기본 설정 후 사용 가능함
    • GUI가 Slack 과 많이 비슷함

반응형
 

Ubuntu

Jumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install Docker Engine on Ubuntu.

docs.docker.com

 

  • Apt repository 추가
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

 

 

  •  설치
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

 

  • 확인
sudo docker run hello-world

 

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

 

  • 추가 정보
    • docker 설치 시 docker-compose가 같이 설치되는데 docker-compose 명령어는 /usr/libexec/docker/cli-plugins/docker-compose 라는 요상한 곳에 설치가 됨
    • 해당 path를 $PATH에 추가해도 좋겠지만...
    • 난 그냥 /usr/local/bin 에 심볼릭 링크 추가함
root@Ubuntu24:~# dpkg -L docker-compose-plugin
/.
/usr
/usr/libexec
/usr/libexec/docker
/usr/libexec/docker/cli-plugins
/usr/libexec/docker/cli-plugins/docker-compose
/usr/share
/usr/share/doc
/usr/share/doc/docker-compose-plugin
/usr/share/doc/docker-compose-plugin/changelog.Debian.gz
root@Ubuntu24:~# ls -al /usr/local/bin/
total 8
drwxr-xr-x  2 root root 4096 Nov 25 23:48 .
drwxr-xr-x 10 root root 4096 May  7  2024 ..
lrwxrwxrwx  1 root root   46 Nov 25 23:48 docker-compose -> /usr/libexec/docker/cli-plugins/docker-compose
root@Ubuntu24:~# docker-compose --help

Usage:  docker compose [OPTIONS] COMMAND

Define and run multi-container applications with Docker

Options:
      --all-resources              Include all resources, even those not used by services
      --ansi string                Control when to print ANSI control characters
                                   ("never"|"always"|"auto") (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --dry-run                    Execute command in dry run mode
      --env-file stringArray       Specify an alternate environment file
  -f, --file stringArray           Compose configuration files
      --parallel int               Control max parallelism, -1 for unlimited (default -1)
      --profile stringArray        Specify a profile to enable
      --progress string            Set type of progress output (auto, tty, plain, json,
                                   quiet) (default "auto")
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the, first specified, Compose file)
  -p, --project-name string        Project name

Commands:
  attach      Attach local standard input, output, and error streams to a service's running container
  build       Build or rebuild services
  config      Parse, resolve and render compose file in canonical format
  cp          Copy files/folders between a service container and the local filesystem
  create      Creates containers for a service
  down        Stop and remove containers, networks
  events      Receive real time events from containers
  exec        Execute a command in a running container
  images      List images used by the created containers
  kill        Force stop service containers
  logs        View output from containers
  ls          List running compose projects
  pause       Pause services
  port        Print the public port for a port binding
  ps          List containers
  pull        Pull service images
  push        Push service images
  restart     Restart service containers
  rm          Removes stopped service containers
  run         Run a one-off command on a service
  scale       Scale services 
  start       Start services
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop services
  top         Display the running processes
  unpause     Unpause services
  up          Create and start containers
  version     Show the Docker Compose version information
  wait        Block until containers of all (or specified) services stop.
  watch       Watch build context for service and rebuild/refresh containers when files are updated

Run 'docker compose COMMAND --help' for more information on a command.
root@Ubuntu24:~#
반응형
  • docker 설치 이후 직접 run을 시킬 경우 docker network이 달라 접속이 되지 않았음
  • Copilot 에게 다시 질문을 해보니 아래와 같이 해결책을 가르쳐 주었다.
    • 현재 docker-compose.yml 를 사용하고 있었는데 적절한 해결책을 제시해 줌
    • 새로운 해결책대로 수정을 해봤더니 바로 접속 성공!!!
     

반응형

Docker 컨테이너에서 실행 중인 PostgreSQL 데이터베이스를 pgAdmin을 통해 관리하는 방법을 단계별로 안내해드릴게요:

1. **pgAdmin Docker 이미지 다운로드**:
   ```bash
   docker pull dpage/pgadmin4
   ```

2. **pgAdmin 컨테이너 실행**:
   ```bash
   docker run --name pgadmin-container -p 5050:80 \
   -e PGADMIN_DEFAULT_EMAIL=your-email@example.com \
   -e PGADMIN_DEFAULT_PASSWORD=your-password \
   -d dpage/pgadmin4
   ```
   여기서 `your-email@example.com`과 `your-password`는 pgAdmin에 로그인할 때 사용할 이메일 주소와 비밀번호로 설정해주세요.

3. **브라우저에서 pgAdmin 접속**:
   - 브라우저를 열고 `http://localhost:5050`으로 접속합니다.
   - 앞서 설정한 이메일 주소와 비밀번호로 로그인합니다.

4. **PostgreSQL 서버 추가**:
   - pgAdmin에 로그인한 후, 왼쪽 상단의 "Add New Server" 버튼을 클릭합니다.
   - 서버 이름을 입력하고, "Connection" 탭으로 이동합니다.
   - 다음 정보를 입력합니다:
     - **Host name/address**: PostgreSQL 컨테이너의 IP 주소 (예: `172.17.0.2`)
     - **Port**: 5432 (기본 포트)
     - **Maintenance database**: postgres
     - **Username**: postgres (기본 사용자 이름)
     - **Password**: PostgreSQL 설정 시 사용한 비밀번호

5. **서버 연결 확인**:
   - 모든 정보를 입력한 후 "Save" 버튼을 클릭합니다.
   - 이제 pgAdmin을 통해 Docker 컨테이너에서 실행 중인 PostgreSQL 데이터베이스에 접속할 수 있습니다.

이 과정을 통해 pgAdmin을 사용하여 Docker 컨테이너에서 실행 중인 PostgreSQL 데이터베이스를 쉽게 관리할 수 있습니다. 더 자세한 정보는 [여기](https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html)에서 확인할 수 있습니다. 😊

어떤 부분이 더 궁금하신가요?

반응형
  • 기존에는 oh-my-zsh을 사용하고 있었음. 그러다 더 이쁜 Oh My Posh 발견!
 

Oh My Zsh - a delightful & open source framework for Zsh

Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with hundresd of helpful functions, plugins, themes, and a few things that make you shout... OH MY ZSH!

ohmyz.sh

 

Home | Oh My Posh

A prompt theme engine for any shell.

ohmyposh.dev

 

  • 많이 예쁨!

 

sudo apt install fish -y
chsh -s /usr/bin/fish
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod a+x /usr/local/bin/oh-my-posh
unzip -o fishomp-config.zip -d $HOME
unzip -o fonts.zip -d $HOME/.local/share/
sudo apt-get install fonts-powerline
sudo apt install flatpak
sudo apt install gnome-software-plugin-flatpak
반응형

https://ko.linux-console.net/?p=10112#gsc.tab=0 

 

Ubuntu 22.04 로그인 화면 배경 변경

Ubuntu 22.04 로그인 화면 배경 변경 대부분의 사용자와 같은 경우 Ubuntu 22.04 시스템을 사용자 지정하여 보다 개인화된 느낌을 주고 싶을 것입니다. 이를 수행하는 가장 확실한 방법 중 하나는 바탕

ko.linux-console.net

 

https://github.com/PRATAP-KUMAR/ubuntu-gdm-set-background

 

GitHub - PRATAP-KUMAR/ubuntu-gdm-set-background: Set GDM Background for Ubuntu (Versions Starting from 20.04 till 21.10 Only)

Set GDM Background for Ubuntu (Versions Starting from 20.04 till 21.10 Only) - GitHub - PRATAP-KUMAR/ubuntu-gdm-set-background: Set GDM Background for Ubuntu (Versions Starting from 20.04 till 21.1...

github.com

 

반응형

https://lucycle.tistory.com/307

 

리눅스에서 Conky로 실시간으로 시스템 정보 확인하기

|Conky 사용하기 리눅스에서 실시간으로 시스템 정보를 확인하려면 터미널에서 nvidia-smi와 같은 명령어를 사용하거나 기타 툴을 실행해야 합니다.이를 더욱 편하게 하기 위해서는 Conky라는 위젯을

lucycle.tistory.com

  • 위 링크의 설정을 사용 시 CPU 온도가 정상적으로 표시가 안되고 있음.
  • 이리 저리 검색을 좀 해보니 hwmon 에서 정확한 path 값을 알아내야 하는 것 같음
➜ ~ cat /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp1_input 
39000
  • 아래 처럼 수정을 하니 동작을 하는 것 같으다.
 63 ${font sans-serif:normal:size=10}${color1}CPU Temp : ${hwmon 3 temp 1} °C
반응형

반응형

+ Recent posts