This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
forked from instructure/canvas-lms
-
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
1 parent
0e63cfc
commit 655fa2a
Showing
2 changed files
with
26 additions
and
55 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# GENERATED FILE, DO NOT MODIFY! | ||
# To update this file please edit the relevant template and run the generation | ||
# task `build/dockerfile_writer.rb --env development --compose-file docker-compose.yml,docker-compose.override.yml --in build/Dockerfile.template --out Dockerfile` | ||
# task `build/dockerfile_writer.rb --env production --compose-file docker-compose.yml,docker-compose.override.yml --in build/Dockerfile.template --out Dockerfile.production` | ||
|
||
ARG RUBY=3.1 | ||
|
||
|
@@ -10,7 +10,9 @@ LABEL maintainer="Instructure" | |
ARG RUBY | ||
ARG POSTGRES_CLIENT=14 | ||
ENV APP_HOME /usr/src/app/ | ||
ENV RAILS_ENV development | ||
ENV RAILS_ENV production | ||
ENV SASS_STYLE compressed | ||
env RAILS_LOAD_ALL_LOCALES=1 | ||
ENV NGINX_MAX_UPLOAD_SIZE 10g | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
@@ -28,13 +30,6 @@ ENV BUNDLE_APP_CONFIG /home/docker/.bundle | |
WORKDIR $APP_HOME | ||
|
||
USER root | ||
|
||
ARG USER_ID | ||
# This step allows docker to write files to a host-mounted volume with the correct user permissions. | ||
# Without it, some linux distributions are unable to write at all to the host mounted volume. | ||
RUN if [ -n "$USER_ID" ]; then usermod -u "${USER_ID}" docker \ | ||
&& chown --from=9999 docker /usr/src/nginx /usr/src/app -R; fi | ||
|
||
RUN mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ | ||
|
@@ -57,7 +52,7 @@ RUN mkdir -p /etc/apt/keyrings \ | |
postgresql-client-$POSTGRES_CLIENT \ | ||
unzip \ | ||
pbzip2 \ | ||
fontforge \ | ||
\ | ||
git \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
|
@@ -69,23 +64,13 @@ RUN npm install -g [email protected] && npm cache clean --force | |
|
||
USER docker | ||
|
||
RUN set -eux; \ | ||
mkdir -p \ | ||
.yardoc \ | ||
app/stylesheets/brandable_css_brands \ | ||
app/views/info \ | ||
config/locales/generated \ | ||
log \ | ||
node_modules \ | ||
packages/js-utils/es \ | ||
packages/js-utils/lib \ | ||
packages/js-utils/node_modules \ | ||
pacts \ | ||
public/dist \ | ||
public/doc/api \ | ||
public/javascripts/translations \ | ||
reports \ | ||
tmp \ | ||
/home/docker/.bundle/ \ | ||
/home/docker/.cache/yarn \ | ||
/home/docker/.gem/ | ||
COPY --chown=docker:docker . /usr/src/app | ||
RUN mkdir -p tmp/files | ||
ENV COMPILE_ASSETS_BRAND_CONFIGS=0 | ||
ENV COMPILE_ASSETS_NPM_INSTALL=0 | ||
RUN unset RUBY && bundle config --global build.nokogiri --use-system-libraries && \ | ||
bundle config --global build.ffi --enable-system-libffi && \ | ||
bundle install | ||
RUN yarn install --frozen-lockfile || yarn install --frozen-lockfile --network-concurrency 1 && \ | ||
bin/rails canvas:compile_assets --trace && \ | ||
rm -rf node_modules |
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,30 +1,16 @@ | ||
# do not create a queue: section for your test environment | ||
test: | ||
common: &common | ||
adapter: postgresql | ||
host: <%= ENV.fetch('PGHOST', 'postgres') %> | ||
password: <%= ENV.fetch('PGPASSWORD') %> | ||
encoding: utf8 | ||
database: canvas_test | ||
host: localhost | ||
username: canvas | ||
password: your_password | ||
username: <%= ENV.fetch('PGUSER', 'postgres') %> | ||
timeout: 5000 | ||
shard1: canvas_test_shard_1 | ||
shard2: canvas_test_shard_2 | ||
|
||
development: | ||
adapter: postgresql | ||
encoding: utf8 | ||
database: canvas_development | ||
password: your_password | ||
timeout: 5000 | ||
secondary: | ||
replica: true | ||
username: canvas_readonly_user | ||
prepared_statements: false | ||
use_qualified_names: true | ||
shard_name: public | ||
schema_search_path: "''" | ||
|
||
production: | ||
adapter: postgresql | ||
encoding: utf8 | ||
database: canvas_production | ||
host: localhost | ||
username: canvas | ||
password: your_password | ||
timeout: 5000 | ||
<<: *common | ||
database: <%= ENV.fetch('PGDATABASE', 'canvas_production') %> | ||
|