Skip to content

Commit

Permalink
Docker: change ivre/db to mongo (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amerousful committed Jun 8, 2023
1 parent 1c63776 commit f298c0a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 63 deletions.
6 changes: 3 additions & 3 deletions doc/install/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ data):

::

$ mkdir -m 1777 var_{lib,log}_mongodb ivre-share dokuwiki_data
$ mkdir -m 1777 var_lib_mongodb ivre-share dokuwiki_data
# For people using SELinux enforced, you need to run
$ sudo chcon -Rt svirt_sandbox_file_t var_{lib,log}_mongodb ivre-share dokuwiki_data
$ sudo chcon -Rt svirt_sandbox_file_t var_lib_mongodb ivre-share dokuwiki_data

$ cp [path to ivre source]/docker/Vagrantfile .
$ vagrant up --no-parallel
Expand All @@ -79,7 +79,7 @@ that, from the ``docker/`` directory, run:

$ docker pull debian:stable
$ docker pull debian:buster
$ for img in base client agent db web web-doku web-uwsgi ; do
$ for img in base client agent web web-doku web-uwsgi ; do
> docker build -t "ivre/$img" "$img"
> done

Expand Down
9 changes: 4 additions & 5 deletions docker/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
#
# Create the directories to store the logs and data:
#
# $ mkdir -m 1777 var_{lib,log}_mongodb ivre-share dokuwiki_data
# $ mkdir -m 1777 var_lib_mongodb ivre-share dokuwiki_data
#
#
# If you have SELinux enforced, run:
#
# $ sudo chcon -Rt svirt_sandbox_file_t var_{lib,log}_mongodb ivre-share dokuwiki_data
# $ sudo chcon -Rt svirt_sandbox_file_t var_lib_mongodb ivre-share dokuwiki_data
#
#
# Then start the containers with:
Expand All @@ -48,11 +48,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# The DB server
config.vm.define 'ivredb' do |db|
db.vm.provider "docker" do |docker|
docker.image = 'ivre/db'
docker.image = 'mongo'
docker.name = 'ivredb'
end
db.vm.synced_folder "var_lib_mongodb", "/var/lib/mongodb"
db.vm.synced_folder "var_log_mongodb", "/var/log/mongodb"
db.vm.synced_folder "var_lib_mongodb", "/data/db"
end

# The PHP Dokuwiki server
Expand Down
43 changes: 0 additions & 43 deletions docker/db/Dockerfile

This file was deleted.

5 changes: 2 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
version: '3'
services:
ivredb:
image: ivre/db
image: mongo
container_name: ivredb
volumes:
- ./var_lib_mongodb:/var/lib/mongodb
- ./var_log_mongodb:/var/log/mongodb
- ./var_lib_mongodb:/data/db
restart: always
ivreuwsgi:
image: ivre/web-uwsgi
Expand Down
4 changes: 2 additions & 2 deletions pkg/builddockers
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ cd "$(dirname "$0")/../docker" || exit 255

docker build --no-cache -t "ivre/base:$tag" "base-local" || exit $?

for img in client agent db web web-doku web-uwsgi ; do
for img in client agent web web-doku web-uwsgi ; do
docker build --no-cache --build-arg TAG="$tag" -t "ivre/$img:$tag" "$img" || exit $?
done

# Uncomment to push images
# docker login
# for img in base client agent db web web-doku web-uwsgi ; do
# for img in base client agent web web-doku web-uwsgi ; do
# docker push "ivre/$img:$tag"
# done
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def _write_pkg_file(self, file):
("share/ivre/docker/agent", ["docker/agent/Dockerfile"]),
("share/ivre/docker/base", ["docker/base/Dockerfile"]),
("share/ivre/docker/client", ["docker/client/Dockerfile"]),
("share/ivre/docker/db", ["docker/db/Dockerfile"]),
(
"share/ivre/docker/web",
["docker/web/Dockerfile", "docker/web/nginx-default-site"],
Expand Down
6 changes: 3 additions & 3 deletions web/static/doc/_sources/install/docker.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ data):

::

$ mkdir -m 1777 var_{lib,log}_mongodb ivre-share dokuwiki_data
$ mkdir -m 1777 var_lib_mongodb ivre-share dokuwiki_data
# For people using SELinux enforced, you need to run
$ sudo chcon -Rt svirt_sandbox_file_t var_{lib,log}_mongodb ivre-share dokuwiki_data
$ sudo chcon -Rt svirt_sandbox_file_t var_lib_mongodb ivre-share dokuwiki_data

$ cp [path to ivre source]/docker/Vagrantfile .
$ vagrant up --no-parallel
Expand All @@ -79,7 +79,7 @@ that, from the ``docker/`` directory, run:

$ docker pull debian:stable
$ docker pull debian:buster
$ for img in base client agent db web web-doku web-uwsgi ; do
$ for img in base client agent web web-doku web-uwsgi ; do
> docker build -t "ivre/$img" "$img"
> done

Expand Down
6 changes: 3 additions & 3 deletions web/static/doc/install/docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ <h2>Using Vagrant<a class="headerlink" href="#using-vagrant" title="Permalink to
source tree (or the <code class="docutils literal notranslate"><span class="pre">[PREFIX]/share/ivre/docker/</span></code> directory when IVRE
has been installed), run (from the folder where you want to store your
data):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ mkdir -m 1777 var_{lib,log}_mongodb ivre-share dokuwiki_data
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ mkdir -m 1777 var_lib_mongodb ivre-share dokuwiki_data
# For people using SELinux enforced, you need to run
$ sudo chcon -Rt svirt_sandbox_file_t var_{lib,log}_mongodb ivre-share dokuwiki_data
$ sudo chcon -Rt svirt_sandbox_file_t var_lib_mongodb ivre-share dokuwiki_data

$ cp [path to ivre source]/docker/Vagrantfile .
$ vagrant up --no-parallel
Expand All @@ -165,7 +165,7 @@ <h2>Build the images<a class="headerlink" href="#build-the-images" title="Permal
that, from the <code class="docutils literal notranslate"><span class="pre">docker/</span></code> directory, run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ docker pull debian:stable
$ docker pull debian:buster
$ for img in base client agent db web web-doku web-uwsgi ; do
$ for img in base client agent web web-doku web-uwsgi ; do
&gt; docker build -t &quot;ivre/$img&quot; &quot;$img&quot;
&gt; done
</pre></div>
Expand Down

0 comments on commit f298c0a

Please sign in to comment.