-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See solidusio/solidus#3947 for details on the decisions that have been taken. We are also decoupling the source of solidus & solidus_i18n dependencies, and providing more flexibility by allowing the specification of both repository & branch for each project (therefore allowing working with forks).
- Loading branch information
1 parent
7685a28
commit 9ba845a
Showing
8 changed files
with
205 additions
and
17 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 @@ | ||
\set HISTFILE ~/history/psql_history |
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,56 @@ | ||
ARG RUBY_VERSION | ||
FROM ruby:$RUBY_VERSION-slim-buster | ||
|
||
ARG PG_VERSION | ||
ARG MYSQL_VERSION | ||
ARG NODE_VERSION | ||
ARG BUNDLER_VERSION | ||
|
||
RUN apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ | ||
build-essential \ | ||
gnupg2 \ | ||
curl \ | ||
git \ | ||
imagemagick \ | ||
libmariadb-dev \ | ||
sqlite3 \ | ||
libsqlite3-dev \ | ||
chromium \ | ||
&& rm -rf /var/cache/apt/lists/* | ||
|
||
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ | ||
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list | ||
|
||
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 8C718D3B5072E1F5 \ | ||
&& echo "deb http://repo.mysql.com/apt/debian/ buster mysql-"$MYSQL_VERSION > /etc/apt/sources.list.d/mysql.list | ||
|
||
RUN curl -sSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - | ||
|
||
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ | ||
libpq-dev \ | ||
postgresql-client-$PG_VERSION \ | ||
mysql-client \ | ||
nodejs \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV APP_USER=solidus_starter_frontend_user \ | ||
LANG=C.UTF-8 \ | ||
BUNDLE_JOBS=4 \ | ||
BUNDLE_RETRY=3 | ||
ENV GEM_HOME=/home/$APP_USER/gems | ||
ENV APP_HOME=/home/$APP_USER/app | ||
ENV PATH=$PATH:$GEM_HOME/bin | ||
|
||
RUN useradd -ms /bin/bash $APP_USER | ||
|
||
RUN gem update --system \ | ||
&& gem install bundler:$BUNDLER_VERSION \ | ||
&& chown -R $APP_USER:$(id -g $APP_USER) /home/$APP_USER/gems | ||
|
||
USER $APP_USER | ||
|
||
RUN mkdir -p /home/$APP_USER/history | ||
|
||
WORKDIR /home/$APP_USER/app |
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 |
---|---|---|
|
@@ -19,3 +19,4 @@ spec/examples.txt | |
.rvmrc | ||
.ruby-version | ||
.ruby-gemset | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
version: '3.7' | ||
|
||
services: | ||
mysql: | ||
image: mysql:8.0 | ||
command: --default-authentication-plugin=mysql_native_password | ||
environment: | ||
MYSQL_ROOT_PASSWORD: password | ||
volumes: | ||
- mysql:/var/lib/mysql:cached | ||
|
||
postgres: | ||
image: postgres:13.2 | ||
environment: | ||
POSTGRES_USER: root | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: solidus_starter_frontend_solidus_test | ||
volumes: | ||
- postgres:/var/lib/postgresql/data:cached | ||
|
||
app: | ||
build: | ||
context: .dockerdev | ||
dockerfile: Dockerfile | ||
args: | ||
RUBY_VERSION: "2.7.2" | ||
PG_VERSION: 13 | ||
NODE_VERSION: 14 | ||
MYSQL_VERSION: "8.0" | ||
BUNDLER_VERSION: 2 | ||
image: solidus_starter_frontend-0.1.0 | ||
command: bash -c "(bundle check || bundle) && tail -f /dev/null" | ||
environment: | ||
CAPYBARA_JS_DRIVER: apparition_docker_friendly | ||
DB_USERNAME: root | ||
DB_PASSWORD: password | ||
DB_ALL: "1" | ||
DB_MYSQL_HOST: mysql | ||
DB_POSTGRES_HOST: postgres | ||
HISTFILE: "/home/solidus_starter_frontend_user/history/bash_history" | ||
MYSQL_HISTFILE: "/home/solidus_starter_frontend_user/history/mysql_history" | ||
# TODO: Remove repo/branch config when PR is merged | ||
SOLIDUS_REPO: 'nebulab/solidus' | ||
SOLIDUS_BRANCH: 'docker' | ||
ports: | ||
- "${SANDBOX_PORT:-3000}:${SANDBOX_PORT:-3000}" | ||
volumes: | ||
- .:/home/solidus_starter_frontend_user/app:delegated | ||
- bundle:/home/solidus_starter_frontend_user/gems:cached | ||
- history:/home/solidus_starter_frontend_user/history:cached | ||
- .dockerdev/.psqlrc:/home/solidus_starter_frontend_user/.psqlrc:cached | ||
tty: true | ||
stdin_open: true | ||
tmpfs: | ||
- /tmp | ||
depends_on: | ||
- mysql | ||
- postgres | ||
|
||
volumes: | ||
bundle: | ||
history: | ||
postgres: | ||
mysql: |
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