mirror of
https://github.com/penpot/penpot.git
synced 2025-03-09 22:31:50 -05:00
🐛 Fix many issues on dev environment.
This commit is contained in:
parent
a0627efffe
commit
ab35716ba2
8 changed files with 33 additions and 31 deletions
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ ! -e ~/local/.fixtures-loaded ]; then
|
if [ ! -e ~/.fixtures-loaded ]; then
|
||||||
echo "Loading fixtures..."
|
echo "Loading fixtures..."
|
||||||
clojure -Adev -X:fn-fixtures
|
clojure -Adev -X:fn-fixtures
|
||||||
touch ~/local/.fixtures-loaded
|
touch ~/.fixtures-loaded
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clojure -m app.main
|
clojure -m app.main
|
||||||
|
|
|
@ -23,7 +23,6 @@ RUN set -ex; \
|
||||||
tmux \
|
tmux \
|
||||||
vim \
|
vim \
|
||||||
curl \
|
curl \
|
||||||
zsh \
|
|
||||||
bash \
|
bash \
|
||||||
git \
|
git \
|
||||||
rlwrap \
|
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 && \
|
apt-get -qqy install postgresql-client-12 && \
|
||||||
rm -rf /var/lib/apt/lists/*;
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
|
COPY files/phantomjs-mock /usr/bin/phantomjs
|
||||||
COPY files/bashrc /root/.bashrc
|
COPY files/bashrc /root/.bashrc
|
||||||
COPY files/vimrc /root/.vimrc
|
COPY files/vimrc /root/.vimrc
|
||||||
COPY files/phantomjs-mock /usr/bin/phantomjs
|
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
|
ARG EXTERNAL_UID=1000
|
||||||
|
|
||||||
RUN set -ex; \
|
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; \
|
passwd uxbox -d; \
|
||||||
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
@ -119,14 +122,6 @@ RUN set -ex; \
|
||||||
USER uxbox
|
USER uxbox
|
||||||
WORKDIR /home/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; \
|
RUN set -ex; \
|
||||||
git clone https://github.com/creationix/nvm.git .nvm; \
|
git clone https://github.com/creationix/nvm.git .nvm; \
|
||||||
bash -c "source .nvm/nvm.sh && nvm install $NODE_VERSION"; \
|
bash -c "source .nvm/nvm.sh && nvm install $NODE_VERSION"; \
|
||||||
|
@ -140,5 +135,5 @@ EXPOSE 3449
|
||||||
EXPOSE 6060
|
EXPOSE 6060
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|
||||||
ENTRYPOINT ["zsh", "/home/uxbox/entrypoint.sh"]
|
ENTRYPOINT ["bash", "/home/entrypoint.sh"]
|
||||||
CMD ["/home/uxbox/init.sh"]
|
CMD ["/home/init.sh"]
|
||||||
|
|
|
@ -17,7 +17,6 @@ services:
|
||||||
image: "uxbox-devenv"
|
image: "uxbox-devenv"
|
||||||
hostname: "uxbox-devenv-main"
|
hostname: "uxbox-devenv-main"
|
||||||
container_name: "uxbox-devenv-main"
|
container_name: "uxbox-devenv-main"
|
||||||
command: "/home/uxbox/init.sh"
|
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -26,8 +25,7 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- "user_data:/home/uxbox/local"
|
- "user_data:/home/uxbox/"
|
||||||
- "${HOME}/.m2:/home/uxbox/.m2"
|
|
||||||
- "${PWD}:/home/uxbox/uxbox"
|
- "${PWD}:/home/uxbox/uxbox"
|
||||||
- ./files/nginx.conf:/etc/nginx/nginx.conf
|
- ./files/nginx.conf:/etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
|
12
docker/devenv/files/entrypoint.sh
Normal file → Executable file
12
docker/devenv/files/entrypoint.sh
Normal file → Executable file
|
@ -1,5 +1,13 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source /home/uxbox/.bashrc
|
||||||
|
|
||||||
source /home/uxbox/.zshrc
|
|
||||||
set -ex
|
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 "$@"
|
exec "$@"
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e;
|
set -e;
|
||||||
source ~/.zshrc
|
source ~/.bashrc
|
||||||
|
|
||||||
echo "[init.sh] Start nginx."
|
echo "[init.sh] Start nginx."
|
||||||
sudo nginx
|
sudo nginx
|
||||||
|
|
||||||
echo "[init.sh] Setting up local permissions."
|
|
||||||
sudo chown -R uxbox /home/uxbox/local
|
|
||||||
|
|
||||||
echo "[init.sh] Ready!"
|
echo "[init.sh] Ready!"
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd ~;
|
||||||
|
|
||||||
set -e;
|
set -e;
|
||||||
source ~/.zshrc
|
source ~/.bashrc
|
||||||
|
|
||||||
echo "[start-tmux.sh] Installing node dependencies"
|
echo "[start-tmux.sh] Installing node dependencies"
|
||||||
pushd ~/uxbox/frontend/
|
pushd ~/uxbox/frontend/
|
||||||
|
|
|
@ -232,8 +232,10 @@ gulp.task("copy:assets:fonts", function() {
|
||||||
|
|
||||||
gulp.task("copy:assets", gulp.parallel("copy:assets:images", "copy:assets:fonts"));
|
gulp.task("copy:assets", gulp.parallel("copy:assets:images", "copy:assets:fonts"));
|
||||||
|
|
||||||
gulp.task("dev:dirs", function(next) {
|
gulp.task("dev:dirs", async function(next) {
|
||||||
mkdirp("./resources/public/css/").then(() => next())
|
await mkdirp("./resources/public/css/");
|
||||||
|
await mkdirp("./resources/public/js/");
|
||||||
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("watch:main", function() {
|
gulp.task("watch:main", function() {
|
||||||
|
|
|
@ -42,7 +42,7 @@ function run-devenv {
|
||||||
start-devenv
|
start-devenv
|
||||||
fi
|
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 {
|
function build-frontend {
|
||||||
|
|
Loading…
Add table
Reference in a new issue