Closed razekmh closed 4 months ago
I have tried this a few times and has not been successful. I faced a few errors and asked Eric Kansa ( the author ) for help. Here is a detailed step by step of my server actions and the output I got.
The server I am testing on is from DigitalOcean. It has the following specs:
on a fresh server I start with update
apt-get update && apt-get upgrade -y
and a reboot
I created a user to manage arches
adduser arches-admin
and added it to sudoers
usermod -aG sudo arches-admin
and then installed docker using apt
# 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
added the user arches-admin
to the docker group
sudo usermod -aG docker $USER
and loaded the new group
newgrp docker
now the user arches-admin
can access docker daemon. I tested this by running
docker run hello-world
it seems to work as expected
and installed neovim
sudo apt install neovim
in arches-admin
's home folder, I cloned the opencontext repo
git clone https://github.com/opencontext/arches-via-docker.git
now in the arches-via-docker
folder I make a new copy edit_dot_env
to a file named .env
I edit the .env
using nvim .env
I modify the variables to the following
DOMAINS=seven.razekmh.dev
DEPLOY_HOST=seven.razekmh.dev
CERTBOT_EMAILS=mahmoud.abdelrazek@ucl.ac.uk
CERTBOT_TEST_CERT=0
DJANGO_MODE=PROD
BUILD_PRODUCTION=True
Now I will started creating the containers
docker volume create --name=logs_nginx
docker volume create --name=nginx_ssl
docker volume create --name=certbot_certs
docker volume create --name=arches_certbot
Now let's build the image 🤞
docker compose up --build
and it works. the server seems to be live. I collected the output during the build process. I will add the log after. The server now has the following containers
CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES |
---|---|---|---|---|---|---|
7b6f2b6893f5 | arches_via_docker/nginx | "/docker-entrypoint.…" | 2 hours ago | Up 2 hours | 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp | nginx |
faa76f42bc97 | arches/arches_webpack | "./webpack_entrypoin…" | 2 hours ago | Exited (0) About an hour ago | arches_webpack | |
49397f3b40f4 | arches | "./entrypoint.sh run…" | 2 hours ago | Up 2 hours | 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp, 0.0.0.0:5678->5678/tcp, :::5678->5678/tcp, 0/tcp, 8021/tcp, 0.0.0.0:5984->5984/tcp, :::5984->5984/tcp, 0.0.0.0:8004->8000/tcp, :::8004->8000/tcp | arches |
b76cfac02a67 | postgis/postgis:14-3.2 | "docker-entrypoint.s…" | 2 hours ago | Up 2 hours | 0.0.0.0:5434->5432/tcp, :::5434->5432/tcp | arches_db |
bd5452ca6859 | elasticsearch:8.5.3 | "/bin/tini -- /usr/l…" | 2 hours ago | Up 2 hours | 0.0.0.0:9202->9200/tcp, :::9202->9200/tcp, 0.0.0.0:9302->9300/tcp, :::9302->9300/tcp | arches_elasticsearch |
ef0cae831314 | arches_oc/certbot | "/opt/certbot.sh" | 2 hours ago | Exited (0) 2 hours ago | certbot | |
1d15c5e00f05 | redis:6-alpine | "docker-entrypoint.s…" | 2 hours ago | Up 2 hours | 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp | arches_redis |
2aedf096b875 | arches_via_docker/cron | "crond -f -l 0" | 2 hours ago | Up 2 hours | cron |
Done!
I want to test the arches installation via docker built by opencontext.