Skip to content

Commit a3aa5af

Browse files
authored
Fix: devcontainer config (#34)
2 parents 11af94d + 4513f68 commit a3aa5af

File tree

7 files changed

+9
-15
lines changed

7 files changed

+9
-15
lines changed

.config/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.devcontainer/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
99
RUN useradd --create-home --shell /bin/bash $USER
1010

1111
USER $USER
12-
ENV PATH "$PATH:/home/$USER/.local/bin"
13-
WORKDIR /home/$USER/admin
12+
RUN mkdir -p /home/$USER/.config/compiler-admin
13+
ENV PATH="$PATH:/home/$USER/.local/bin:/home/$USER/.config/compiler-admin/gyb"
14+
WORKDIR /home/$USER/compiler-admin
1415

1516
RUN python -m pip install --upgrade pip
1617

@@ -20,7 +21,7 @@ COPY pyproject.toml pyproject.toml
2021
RUN pip install -e .[dev,test]
2122

2223
USER root
23-
RUN chown -R $USER /home/$USER
24+
RUN chown -R $USER:$USER /home/$USER
2425
USER $USER
2526

2627
CMD ["sleep", "infinity"]

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "compilerla/admin",
33
"dockerComposeFile": ["../compose.yaml"],
44
"service": "dev",
5-
"workspaceFolder": "/home/compiler/admin",
5+
"workspaceFolder": "/home/compiler/compiler-admin",
66
"postAttachCommand": ["/bin/bash", ".devcontainer/postAttach.sh"],
77
"customizations": {
88
"vscode": {

.devcontainer/postAttach.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@
22
set -eu
33

44
pre-commit install --install-hooks
5-
6-
echo -e "\nexport PATH=$PATH:/home/compiler/admin/.config/gyb" >> ~/.bashrc

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
GYB-GMail-Backup-*/
22
__pycache__
33
.config/*
4-
!.config/README.md
54
.coverage
65
.downloads
76
.env

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ options:
2828
## Getting started
2929
3030
```bash
31+
mkdir -p ~/.config/compiler-admin
32+
3133
git clone https://github.com/compilerla/compiler-admin.git
3234
3335
cd compiler-admin

compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ services:
88
- .env
99
entrypoint: sleep infinity
1010
volumes:
11-
- .:/home/compiler/admin
12-
- ./.config:/home/compiler/.config/compiler-admin
11+
- .:/home/compiler/compiler-admin
12+
- ~/.config/compiler-admin:/home/compiler/.config/compiler-admin
1313
- ./.downloads:/home/compiler/Downloads

0 commit comments

Comments
 (0)