Skip to content

Instantly share code, notes, and snippets.

View ignaciojonas's full-sized avatar

Ignacio Jonas ignaciojonas

View GitHub Profile
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
VARIANT: "2.7"
NODE_VERSION: "lts/*"
# [Choice] Ruby version: 2, 2.7, 2.6, 2.5
ARG VARIANT=2
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
# Install Rails
RUN gem install rails webdrivers
ARG NODE_VERSION="lts/*"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/docker-from-docker-compose
{
"name": "Ruby on Rails + Postgres",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create.
"settings": {
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/ruby-rails
{
"name": "Ruby on Rails",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a Ruby version: 2, 2.7, 2.6, 2.5
"VARIANT": "2.7",
"NODE_VERSION": "lts/*"
@ignaciojonas
ignaciojonas / docker-compose.yml
Created October 17, 2018 04:35
Docker Compose Production travis-example
version: '3'
services:
# The Application
laravel:
image: .
ports:
- "80:80"
environment:
- "DB_PORT=5432"
- "DB_HOST=database"
@ignaciojonas
ignaciojonas / Dockerfile
Created October 17, 2018 04:34
Dockerfile Travis-example
#start with our base image (the foundation) - version 7.1.5
FROM php:7.1.5-apache
#install all the system dependencies and enable PHP modules
RUN apt-get update && apt-get install -y \
libicu-dev \
libpq-dev \
libmcrypt-dev \
git \
zip \
@ignaciojonas
ignaciojonas / travis.yml
Created November 2, 2017 01:46
travis.yml
sudo: required
language: php
dist: trusty
php:
- 7.1
services:
- postgresql
@ignaciojonas
ignaciojonas / DuskTestCase.php
Created November 1, 2017 23:11
DuskTestCase.php
<?php
...
protected function driver()
{
$options_array = env('TRAVIS', false) ? ['--disable-gpu','--headless','--window-size=1100,600'] : [];
$options = (new ChromeOptions)->addArguments($options_array);
return RemoteWebDriver::create(
env('CHROME_HOST', 'http://selenium:4444/wd/hub'), DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY, $options
)
APP_ENV=testing
APP_DEBUG=true
APP_KEY=
APP_URL=http://localhost:8000
DB_CONNECTION=pgsql
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=bomberos_test
DB_USERNAME=postgres
@ignaciojonas
ignaciojonas / app.dockerfile
Created August 2, 2017 23:59
Docker Compose - Programación Web II - TUPAR
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql