0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-09 14:21:42 -05:00

🐛 Fix many issues on dev environment.

This commit is contained in:
Andrey Antukh 2020-09-07 13:38:17 +02:00 committed by Alonso Torres
parent a0627efffe
commit ab35716ba2
8 changed files with 33 additions and 31 deletions

View file

@ -2,10 +2,10 @@
set -e
if [ ! -e ~/local/.fixtures-loaded ]; then
if [ ! -e ~/.fixtures-loaded ]; then
echo "Loading fixtures..."
clojure -Adev -X:fn-fixtures
touch ~/local/.fixtures-loaded
touch ~/.fixtures-loaded
fi
clojure -m app.main

View file

@ -23,7 +23,6 @@ RUN set -ex; \
tmux \
vim \
curl \
zsh \
bash \
git \
rlwrap \
@ -93,14 +92,18 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get -qqy install postgresql-client-12 && \
rm -rf /var/lib/apt/lists/*;
COPY files/bashrc /root/.bashrc
COPY files/vimrc /root/.vimrc
COPY files/phantomjs-mock /usr/bin/phantomjs
COPY files/bashrc /root/.bashrc
COPY files/vimrc /root/.vimrc
COPY files/tmux.conf /root/.tmux.conf
COPY files/start-tmux.sh /home/start-tmux.sh
COPY files/entrypoint.sh /home/entrypoint.sh
COPY files/init.sh /home/init.sh
ARG EXTERNAL_UID=1000
RUN set -ex; \
useradd -m -g users -s /bin/zsh -u $EXTERNAL_UID uxbox; \
useradd -m -g users -s /bin/bash -u $EXTERNAL_UID uxbox; \
passwd uxbox -d; \
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
@ -119,14 +122,6 @@ RUN set -ex; \
USER uxbox
WORKDIR /home/uxbox
COPY files/bashrc /home/uxbox/.bashrc
COPY files/zshrc /home/uxbox/.zshrc
COPY files/vimrc /home/uxbox/.vimrc
COPY files/start-tmux.sh /home/uxbox/start-tmux.sh
COPY files/tmux.conf /home/uxbox/.tmux.conf
COPY files/entrypoint.sh /home/uxbox/
COPY files/init.sh /home/uxbox/
RUN set -ex; \
git clone https://github.com/creationix/nvm.git .nvm; \
bash -c "source .nvm/nvm.sh && nvm install $NODE_VERSION"; \
@ -140,5 +135,5 @@ EXPOSE 3449
EXPOSE 6060
EXPOSE 9090
ENTRYPOINT ["zsh", "/home/uxbox/entrypoint.sh"]
CMD ["/home/uxbox/init.sh"]
ENTRYPOINT ["bash", "/home/entrypoint.sh"]
CMD ["/home/init.sh"]

View file

@ -17,7 +17,6 @@ services:
image: "uxbox-devenv"
hostname: "uxbox-devenv-main"
container_name: "uxbox-devenv-main"
command: "/home/uxbox/init.sh"
stop_signal: SIGINT
depends_on:
@ -26,8 +25,7 @@ services:
- redis
volumes:
- "user_data:/home/uxbox/local"
- "${HOME}/.m2:/home/uxbox/.m2"
- "user_data:/home/uxbox/"
- "${PWD}:/home/uxbox/uxbox"
- ./files/nginx.conf:/etc/nginx/nginx.conf

12
docker/devenv/files/entrypoint.sh Normal file → Executable file
View file

@ -1,5 +1,13 @@
#!/usr/bin/env zsh
#!/usr/bin/env bash
source /home/uxbox/.bashrc
source /home/uxbox/.zshrc
set -ex
sudo cp /root/.bashrc /home/uxbox/.bashrc
sudo cp /root/.vimrc /home/uxbox/.vimrc
sudo cp /root/.tmux.conf /home/uxbox/.tmux.conf
sudo chown uxbox:users /home/uxbox
exec "$@"

View file

@ -1,13 +1,10 @@
#!/usr/bin/env zsh
#!/usr/bin/env bash
set -e;
source ~/.zshrc
source ~/.bashrc
echo "[init.sh] Start nginx."
sudo nginx
echo "[init.sh] Setting up local permissions."
sudo chown -R uxbox /home/uxbox/local
echo "[init.sh] Ready!"
tail -f /dev/null

View file

@ -1,7 +1,9 @@
#!/usr/bin/env zsh
#!/usr/bin/env bash
cd ~;
set -e;
source ~/.zshrc
source ~/.bashrc
echo "[start-tmux.sh] Installing node dependencies"
pushd ~/uxbox/frontend/

View file

@ -232,8 +232,10 @@ gulp.task("copy:assets:fonts", function() {
gulp.task("copy:assets", gulp.parallel("copy:assets:images", "copy:assets:fonts"));
gulp.task("dev:dirs", function(next) {
mkdirp("./resources/public/css/").then(() => next())
gulp.task("dev:dirs", async function(next) {
await mkdirp("./resources/public/css/");
await mkdirp("./resources/public/js/");
next();
});
gulp.task("watch:main", function() {

View file

@ -42,7 +42,7 @@ function run-devenv {
start-devenv
fi
docker exec -ti uxbox-devenv-main /home/uxbox/start-tmux.sh
docker exec -ti uxbox-devenv-main /home/start-tmux.sh
}
function build-frontend {