-
-
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.
- Loading branch information
Showing
12 changed files
with
120 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04 | ||
|
||
# Adding the PostgreSQL repository so we can install postgresql-client v15 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null | ||
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' |
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,19 @@ | ||
#!/bin/bash | ||
|
||
echo "Setting SSH password for vscode user..." | ||
sudo usermod --password "$(echo vscode | openssl passwd -1 -stdin)" vscode | ||
|
||
echo "Updating RubyGems..." | ||
gem update --system -N | ||
|
||
echo "Installing dependencies..." | ||
bundle install | ||
yarn install | ||
|
||
echo "Copying database.yml..." | ||
cp -n .env.devcontainer .env | ||
|
||
echo "Creating database..." | ||
bin/rails db:create db:migrate db:seed | ||
|
||
echo "Done!" |
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,51 @@ | ||
{ | ||
"name": "Your Project Name", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
"features": { | ||
"ghcr.io/devcontainers/features/sshd:1": {}, | ||
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { | ||
"packages": "libpq-dev, libvips, postgresql-client-15" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/ruby:1": { | ||
"version": "3.2.2" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "16.19.0" | ||
}, | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"username": "vscode", | ||
"userUid": 1000, | ||
"userGid": 1000, | ||
"installZsh": true, | ||
"installOhMyZsh": true, | ||
"configureZshAsDefaultShell": true, | ||
"upgradePackages": true | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": { | ||
"username": "vscode", | ||
"plugins": "bundler rails ruby yarn" | ||
} | ||
}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["Shopify.ruby-lsp"] | ||
} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// This can be used to network with other containers or the host. | ||
"forwardPorts": [2222, 3000, 5433], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": ".devcontainer/boot.sh" | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
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,30 @@ | ||
version: "3" | ||
|
||
services: | ||
app: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
volumes: | ||
- ../..:/workspaces:cached | ||
command: sleep infinity | ||
postgres: | ||
image: postgres:15-alpine | ||
restart: unless-stopped | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
ports: | ||
- 5433:5432 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: postgres | ||
POSTGRES_PASSWORD: postgres | ||
redis: | ||
image: redis:7-alpine | ||
restart: unless-stopped | ||
volumes: | ||
- redis-data:/data | ||
|
||
volumes: | ||
postgres-data: | ||
redis-data: |
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 @@ | ||
from https://github.com/luizkowalski/devcontainer-rails |
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,4 @@ | ||
DATABASE_URL=postgres://postgres:postgres@postgres:5432/bsdsec_development | ||
TEST_DATABASE_URL=postgres://postgres:postgres@postgres:5432/bsdsec_test | ||
TEST_EMAIL=test@example.com | ||
MAILGUN_INGRESS_API_KEY=asdf |
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 @@ | ||
16.19.0 |
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 +1 @@ | ||
2.7.6 | ||
3.2.3 |
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
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
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
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