-
Notifications
You must be signed in to change notification settings - Fork 13
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
6 changed files
with
127 additions
and
22 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,3 @@ | ||
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version | ||
ARG RUBY_VERSION=3.3.0 | ||
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION |
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,57 @@ | ||
name: "phlexui-web" | ||
|
||
services: | ||
rails-app: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
|
||
volumes: | ||
- ../..:/workspaces:cached | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity | ||
|
||
networks: | ||
- default | ||
|
||
# Uncomment the next line to use a non-root user for all processes. | ||
# user: vscode | ||
|
||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally. | ||
# (Adding the "ports" property to this file will not forward from a Codespace.) | ||
ports: | ||
- 45678:45678 | ||
depends_on: | ||
- selenium | ||
- redis | ||
- postgres | ||
|
||
selenium: | ||
image: seleniarm/standalone-chromium | ||
restart: unless-stopped | ||
networks: | ||
- default | ||
|
||
redis: | ||
image: redis:7.2 | ||
restart: unless-stopped | ||
networks: | ||
- default | ||
volumes: | ||
- redis-data:/data | ||
|
||
postgres: | ||
image: postgres:16.1 | ||
restart: unless-stopped | ||
networks: | ||
- default | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
|
||
volumes: | ||
redis-data: | ||
postgres-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,48 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby | ||
{ | ||
"name": "phlexui-web", | ||
"dockerComposeFile": "compose.yaml", | ||
"service": "rails-app", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
"ghcr.io/rails/devcontainer/features/activestorage": {}, | ||
"ghcr.io/rails/devcontainer/features/postgres-client": {} | ||
}, | ||
|
||
"containerEnv": { | ||
"CAPYBARA_SERVER_PORT": "45678", | ||
"SELENIUM_HOST": "selenium", | ||
"REDIS_URL": "redis://redis:6379/1", | ||
"DB_HOST": "postgres" | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000, 5432, 6379], | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"Shopify.ruby-lsp", | ||
"testdouble.vscode-standard-ruby" | ||
] | ||
}, | ||
"settings": { | ||
"rubyLsp.rubyVersionManager": { | ||
"identifier": "rbenv" | ||
} | ||
} | ||
}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root", | ||
|
||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "bin/setup" | ||
} |
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