Skip to content

Commit

Permalink
Move Dockerfile, docker-compose.yml to /
Browse files Browse the repository at this point in the history
This is better, other tools can use them from /.
  • Loading branch information
gaborcsardi committed Oct 12, 2024
1 parent 9a2ce57 commit d26abfc
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion .devcontainer/.env

This file was deleted.

4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "r-app",
"postCreateCommand": "service ssh start",
"dockerComposeFile": "docker-compose.yml",
"dockerComposeFile": "../docker-compose.yml",
"service": "r-app",
"shutdownAction": "stopCompose",
// It is not mounted automatically if we use a compose file (?)
"mounts": [{
"source": "..",
"source": ".",
"target": "/workspaces/${localWorkspaceFolderBasename}",
"type": "bind"
}, {
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- name: Build
uses: docker/build-push-action@v6
with:
file: .devcontainer/Dockerfile
platforms: linux/amd64
push: true
target: prod
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- name: Build
uses: docker/build-push-action@v6
with:
file: .devcontainer/Dockerfile
platforms: linux/amd64
push: false
target: test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.quarto/
/www
/cache
/.env
File renamed without changes.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you use Positron, then for the first time:
```
1. Use a random port for SSH (optional).
```
echo PORT=2222 >> .devcontainer/.env
echo PORT=2222 >> .env
```
1. Build and start the dev container:
```
Expand Down Expand Up @@ -60,7 +60,7 @@ Positron does not stop the container when it disconnects. The devcontainer
cli also cannot stop it currently. To stop the container call docker
directly:
```
docker stop cran-metadata_devcontainer-r-app-1
docker stop cran-metadata-r-app-1
```

#### Restarting
Expand All @@ -74,8 +74,8 @@ devcontainer up --workspace-folder .

To rebuild a container stop it and delete it before you build it again:
```
docker stop cran-metadata_devcontainer-r-app-1
docker rm cran-metadata_devcontainer-r-app-1
docker stop cran-metadata-r-app-1
docker rm cran-metadata-r-app-1
devcontainer up --workspace-folder .
```

Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/docker-compose.yml → docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
r-app:
build:
dockerfile: .devcontainer/Dockerfile
context: ..
dockerfile: Dockerfile
context: .
command: sleep infinity
ports:
- ${PORT:-2222}:2222

0 comments on commit d26abfc

Please sign in to comment.