Skip to content

bigos/ultralisp-notes

Repository files navigation

README

Docker manuals https://docs.docker.com/ Command docker info lets you find many important facts about the docker installation

lots of info for beginners https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/

Ultralisp notes is a repo for note taking related to: https://github.com/ultralisp/ultralisp. we use my fork here https://github.com/bigos/ultralisp

Dependencies

Docker

The unsuccessful attempt did not take into consideration the relevant documentation

https://phase2.github.io/devtools/getting-started/linux-installation/#linux-installation-on-ubuntulinux-mintdebian

https://phase2.github.io/devtools/getting-started/linux-installation/#linux-dns-configuration-options

Installation for web page

https://docs.docker.com/desktop/install/linux-install/ https://docs.docker.com/desktop/install/ubuntu/

failed

Installation from apt

sudo apt install docker.io docker-compose

gives the following version

docker --version
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2

First unsuccessful running it on my machine

there is an org file for that How to start server and worker outside Docker

and

https://github.com/ultralisp/ultralisp#how-to-host-ultralisp-on-my-own-server

after cloning the repo,

trying to run:

docker-compose run --rm mito migrate

gives me permission errors

Why? Do I need sudo?

or https://docs.docker.com/engine/install/linux-postinstall/

trying to fix permissions

sudo gpasswd -a $USER docker

leads to another error

$ docker-compose run --rm mito migrate
ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml

https://docs.docker.com/engine/install/linux-postinstall/

the fix

sudo gpasswd -a $USER docker
docker run hello-world

gives

Unable to find image ‘hello-world:latest’ locally latest: Pulling from library/hello-world 2db29710123e: Pull complete Digest: sha256:ffb13da98453e0f04d33a6eee5bb8e46ee50d08ebe17735fc0779d0349e889e9 Status: Downloaded newer image for hello-world:latest

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

running docker compose

cd ~/Programming/Lisp/ultralisp
docker-compose run --rm mito migrate

gives lots of output that makes sense now

and an LW error

Step 15/36 : COPY dist-lw80 /lispworks ERROR: Service ‘mito’ failed to build : COPY failed: file not found in build context or excluded by .dockerignore: stat dist-lw80: file does not exist

investigation

two files with dist-lw80 file:~/Programming/Lisp/ultralisp/Dockerfile::46 file:~/Programming/Lisp/ultralisp/.github/workflows/build-and-deploy.yml::112

I will try to comment out lines 39-61 in Dockerfile first.

error in gen-deps-system, missing alexandria

; Loading “gen-deps-system” [1/3] System ‘gen-deps-system’ found. Loading the system.. ; ; caught ERROR: ; READ error during COMPILE-FILE: ; ; Package ALEXANDRIA does not exist. ; ; Line: 111, Column: 35, File-Position: 5087 ;

investigation

gen deps in 4 files file:~/Programming/Lisp/ultralisp/Dockerfile::92 file:~/Programming/Lisp/ultralisp/docker-compose.yml::155 file:~/Programming/Lisp/ultralisp/Makefile::13 file:~/Programming/Lisp/ultralisp/Lakefile::61

this script file:~/Programming/Lisp/ultralisp/Dockerfile::92 seems to pull https://github.com/40ants/gen-deps-system I have the fork https://github.com/bigos/gen-deps-system should I try to add alexandria and push file:~/Programming/Lisp/gen-deps-system/roswell/gen-deps-system.ros::8 and modify this file:~/Programming/Lisp/ultralisp/Dockerfile::92 to pull from https://github.com/bigos/gen-deps-system

I have forks of two svetlak’s repos and was able to run the docker command.

Successful running it on another machine

sudo apt install docker.io docker-compose
docker --version
sudo gpasswd -a $USER docker

# log out and log in again

docker run hello-world

cd ~/Programming/Lisp/ultralisp
docker-compose run --rm mito migrate
sudo chmod -v 777 ./postgresql-data

# for prod
docker-compose up app

# for hacking
docker-compose up --build --abort-on-container-exit app

viewing the results

Successful run of the above can be verified by opening another terminal and running the script with the command and output like this

$ docker ps
CONTAINER ID   IMAGE                                  COMMAND                  CREATED          STATUS          PORTS                                                NAMES
d3bd09c5eafc   ultralisp_app                          "s6-svscan /etc/s6"      4 minutes ago    Up 4 minutes    127.0.0.1:8080->80/tcp, 127.0.0.1:14005->4005/tcp    ultralisp_app
101b8acd2106   ultralisp_worker                       "s6-svscan /etc/s6"      4 minutes ago    Up 4 minutes    80/tcp, 127.0.0.1:14006->4005/tcp                    ultralisp_worker
38281be13d25   artefactual/gearmand:1.1.19.1-alpine   "docker-entrypoint.s…"   4 minutes ago    Up 4 minutes    127.0.0.1:4730->4730/tcp                             ultralisp_gearman
0c101b2d137b   elasticsearch:7.3.2                    "/usr/local/bin/dock…"   4 minutes ago    Up 4 minutes    127.0.0.1:9200->9200/tcp, 127.0.0.1:9300->9300/tcp   ultralisp_elastic
19a8f63a7c38   postgres:10                            "docker-entrypoint.s…"   17 minutes ago   Up 17 minutes   127.0.0.1:5432->5432/tcp                             ultralisp_db
457e9ec9dabb   postgres:10                            "docker-entrypoint.s…"   17 minutes ago   Up 17 minutes   127.0.0.1:5433->5432/tcp                             ultralisp_empty_db

working web page

Running the commands in the successful run should give working web page. http:https://localhost:8080/

using lake

In REPL

(ql:quickload :lake)

CL-USER> (uiop:chdir "~/Programming/Lisp/ultralisp")
0
CL-USER> (uiop:getcwd)
#P"/home/jacek/Programming/Lisp/ultralisp/"

(lake:display-tasks)
; gives list of tasks

(lake:lake :target "version")
; gives the same as: lake version

(lake:lake :target "devserver")
# i have no idea what should happen here

stopping all

(lake:lake :target "stop")
docker-compose ps

docker ps shows empty table docker-compose ps shows containers in exit state

Trying to restart with lake

(lake:lake :target "devserver")

shows all conainers in up state except the ultralisp_empty_db

deleting to start again

https://stackoverflow.com/questions/44785585/how-can-i-delete-all-local-docker-images

docker rm -vf $(docker ps -aq)
docker rmi -f $(docker images -aq)

SSH into a container

https://phase2.github.io/devtools/common-tasks/ssh-into-a-container/

docker service installation and status on Ubuntu like systems

installation on Ubuntu

checking the service jacek@jacek-Lenovo-YOGA-3-Pro-1370:~$ sudo service postgresql status^C

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages