-
-
Save imme-emosol/40158c0268595d516caf969c331d8cb0 to your computer and use it in GitHub Desktop.
This is a Dockerfile to create and run a local instance of Savane
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Launch Built-in web server", | |
| "type": "php", | |
| "request": "launch", | |
| "runtimeArgs": [ | |
| "-dxdebug.mode=debug", | |
| "-dxdebug.start_with_request=yes", | |
| "-S", | |
| "127.0.0.1:7890", | |
| "-t", | |
| "/~/sv/frontend/php/", | |
| "/~/sv/local2/local.php" | |
| ], | |
| "env": { | |
| "XDEBUG_MODE": "debug,develop", | |
| "XDEBUG_CONFIG": "client_port=${port}", | |
| "SAVANE_PHPROOT": "/~/sv/frontend/php" | |
| }, | |
| "program": "", | |
| "cwd": "${workspaceRoot}", | |
| "port": 9000, | |
| "serverReadyAction": { | |
| "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", | |
| "uriFormat": "http://localhost:%s", | |
| "action": "openExternally" | |
| } | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:stable-slim | |
| WORKDIR ~/sv | |
| COPY . . | |
| # set up the database | |
| RUN apt update && apt install mariadb-server autoconf automake gettext make imagemagick php php-mysqli -y | |
| # run this manually or in the ./run-local-dev.sh script, it doesn't work here for some reason | |
| # RUN service mysql restart | |
| # RUN mysql -uroot -e "CREATE DATABASE sv_demo; CREATE USER 'sv'@'localhost' IDENTIFIED BY 'sv'; GRANT ALL PRIVILEGES ON sv_demo.* TO 'sv'@'localhost';" | |
| # RUN gzip -d < savane_demo-2022-05.sql.gz | mysql --user=sv --password=sv sv_demo | |
| # build the app | |
| RUN ./bootstrap && ./configure --prefix=$HOME/sv/install | |
| RUN make && make install | |
| RUN echo 'repo.group=GNU Core Utilities\ | |
| repo.url=coreutils.git\ | |
| repo.path=/srv/git/coreutils.git\ | |
| repo.desc=GNU coreutils\ | |
| repo.readme=README.html\ | |
| repo.owner=\ | |
| repo.group=emacs\ | |
| repo.url=emacs.git\ | |
| repo.path=/srv/git/emacs.git\ | |
| repo.desc=Emacs source repository\ | |
| repo.readme=README.html\ | |
| repo.owner=\ | |
| repo.url=emacs/elpa.git\ | |
| repo.path=/srv/git/emacs/elpa.git\ | |
| repo.desc=GNU ELPA\ | |
| repo.readme=README.html\ | |
| repo.owner=\ | |
| repo.url=emacs/nongnu.git\ | |
| repo.path=/srv/git/emacs/nongnu.git\ | |
| repo.desc=NonGNU ELPA\ | |
| repo.readme=README.html\ | |
| repo.owner=\ | |
| repo.url=emacs/org-mode.git\ | |
| repo.path=/srv/git/emacs/org-mode.git\ | |
| repo.desc=Emacs Org mode\ | |
| repo.readme=README.html\ | |
| repo.owner=\ | |
| repo.group=GNU sed\ | |
| repo.url=sed.git\ | |
| repo.path=/srv/git/sed.git\ | |
| repo.desc=GNU stream editor\ | |
| repo.readme=README.html\ | |
| repo.owner=\ | |
| repo.url=sed/sed-history.git\ | |
| repo.path=/srv/git/sed/sed-history.git\ | |
| repo.desc=\ | |
| repo.readme=README.html\ | |
| repo.owner=' >> ~/sv/install/etc/savane/cgitrepos | |
| RUN echo '<?php' > local2/etc-savane/savane-dev-db.php | |
| RUN echo '$sys_dbhost="localhost";' >> local2/etc-savane/savane-dev-db.php | |
| RUN echo '$sys_dbname="sv_demo";' >> local2/etc-savane/savane-dev-db.php | |
| RUN echo '$sys_dbuser="sv";' >> local2/etc-savane/savane-dev-db.php | |
| RUN echo '$sys_dbpasswd="sv";' >> local2/etc-savane/savane-dev-db.php | |
| RUN echo '?>";' >> local2/etc-savane/savane-dev-db.php | |
| EXPOSE 7890 | |
| EXPOSE 80 | |
| CMD ["./run-local-dev.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment