-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from yorkblansh/chore/template_sync_0a817b8
update from devcontainer-template
- Loading branch information
Showing
3 changed files
with
63 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
FROM node:20 | ||
|
||
RUN apt-get update && apt-get install fish vim curl sudo tmux -y && \ | ||
echo "fish" >>~/.bashrc | ||
|
||
RUN echo 'root:123' | chpasswd | ||
RUN echo 'node:123' | chpasswd | ||
|
||
RUN npm i -g npm | ||
RUN npm i -g npm-check-updates | ||
|
||
RUN sudo usermod -a -G sudo node | ||
|
||
USER node | ||
|
||
# customize tmux | ||
RUN cd && \ | ||
git clone https://github.com/gpakosz/.tmux.git && \ | ||
ln -s -f .tmux/.tmux.conf && \ | ||
cp .tmux/.tmux.conf.local . | ||
|
||
RUN echo "fish" >>~/.bashrc | ||
RUN mkdir -p ~/.config/fish | ||
RUN echo "alias tmux='tmux -2'" >>~/.config/fish/config.fish | ||
RUN echo "set -g default-terminal 'xterm-256color' \n set-option -ga terminal-overrides ',xterm-256color:Tc'" >>~/.tmux.conf | ||
|
||
WORKDIR /app | ||
|
||
ENV PORT=5055 | ||
|
||
EXPOSE 5055 | ||
|
||
FROM node:20 | ||
|
||
RUN apt-get update && apt-get install fish vim curl sudo tmux -y && \ | ||
echo "fish" >>~/.bashrc | ||
|
||
RUN echo 'root:123' | chpasswd | ||
RUN echo 'node:123' | chpasswd | ||
|
||
RUN npm i -g npm npm-check-updates bun | ||
|
||
RUN sudo usermod -a -G sudo node | ||
|
||
USER node | ||
|
||
# customize tmux | ||
RUN cd && \ | ||
git clone https://github.com/gpakosz/.tmux.git && \ | ||
ln -s -f .tmux/.tmux.conf && \ | ||
cp .tmux/.tmux.conf.local . | ||
|
||
RUN echo "fish" >>~/.bashrc | ||
RUN mkdir -p ~/.config/fish | ||
RUN echo "alias tmux='tmux -2'" >>~/.config/fish/config.fish | ||
RUN echo "set -g default-terminal 'xterm-256color' \n set-option -ga terminal-overrides ',xterm-256color:Tc'" >>~/.tmux.conf | ||
|
||
# install lazygit | ||
RUN wget https://github.com/jesseduffield/lazygit/releases/download/v$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')/lazygit_$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')_Linux_32-bit.tar.gz -P ~/.lazygit/ | ||
RUN tar -xf ~/.lazygit/lazygit_$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')_Linux_32-bit.tar.gz -C ~/.lazygit/ | ||
RUN echo "alias lazygit='~/.lazygit/lazygit'" >>~/.config/fish/config.fish | ||
RUN echo "alias lz='~/.lazygit/lazygit'" >>~/.config/fish/config.fish | ||
RUN git config --global core.autocrlf true | ||
RUN git config --global --add safe.directory '*' | ||
|
||
WORKDIR /app | ||
|
||
ENV PORT=5055 | ||
|
||
EXPOSE 5055 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
version: '3.8' | ||
|
||
services: | ||
node-20: | ||
image: node:20 | ||
|
||
api: | ||
extra_hosts: | ||
- 'host.docker.internal:host-gateway' | ||
# network_mode: "host" | ||
container_name: api-dev | ||
build: | ||
context: ./ | ||
dockerfile: ./Dockerfile | ||
ports: | ||
- 85:5055 | ||
- 86:5056 | ||
- 5172:5172 | ||
# - 1401:1401 | ||
- 1420:1420 | ||
volumes: | ||
- ./:/app | ||
tty: true | ||
stdin_open: true | ||
restart: on-failure | ||
services: | ||
node-20: | ||
image: node:20 | ||
|
||
app: | ||
extra_hosts: | ||
- 'host.docker.internal:host-gateway' | ||
container_name: app | ||
build: | ||
context: ./ | ||
dockerfile: ./Dockerfile | ||
ports: | ||
- 90:5055 | ||
- 5174:5172 | ||
volumes: | ||
- ./:/app | ||
tty: true | ||
stdin_open: true | ||
restart: on-failure |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
wget https://github.com/jesseduffield/lazygit/releases/download/v$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')/lazygit_$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')_Linux_32-bit.tar.gz -P ~/.lazygit/ | ||
tar -xf ~/.lazygit/lazygit_$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')_Linux_32-bit.tar.gz -C ~/.lazygit/ | ||
echo "alias lazygit='~/.lazygit/lazygit'" >> ~/.config/fish/config.fish | ||
echo "alias lz='~/.lazygit/lazygit'" >> ~/.config/fish/config.fish | ||
source ~/.config/fish/config.fish |