Skip to content

Commit

Permalink
Revert "Get exercises working in docker" (#3903)
Browse files Browse the repository at this point in the history
This reverts commit 4597861.
  • Loading branch information
therealmarv authored Dec 20, 2023
1 parent b5958ce commit 218b046
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 558 deletions.
21 changes: 4 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
FROM node:18-slim as base
FROM node:10.9-slim as builder

RUN apt-get update && apt-get install -y \
build-essential \
g++ \
gcc \
git \
curl \
# Additional packages required by python build
zlib1g \
zlib1g-dev \
libssl-dev \
libbz2-dev \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*

FROM base as builder

ENV PATH=/root/.pyenv/bin:$PATH
RUN curl https://pyenv.run | bash \
&& eval "$(pyenv virtualenv-init -)" \
&& pyenv install 2.7 \
&& ln -s /root/.pyenv/shims/python /usr/bin/python
python2.7 \
&& rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/bin/python2.7 /usr/bin/python2

FROM builder as build
ARG PUBLIC_PATH
Expand Down
2 changes: 1 addition & 1 deletion bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ "$(version "$npm_version")" -lt "$(version "$required_version")" ]; then
fi

[ -d $OX_PROJECT/dist ] && rm -r $OX_PROJECT/dist
NODE_OPTIONS="--openssl-legacy-provider" npx webpack --config webpack.config.js
$(npm bin)/webpack --config webpack.config.js

# we're done unless the "archive" flag from the ansible build is set
if [ "$2" != "archive" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/serve
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ echo Serving: $OX_PROJECT
if [ x$2 == x"standalone" ]; then
node tutor/specs/acceptance/server/index.js
else
NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=2048" npx webpack-dev-server --debug --progress --config webpack.config.js
node --max_old_space_size=2048 $(npm bin)/webpack-dev-server --debug --progress --config webpack.config.js
fi
14 changes: 0 additions & 14 deletions docker-compose.exercises.yml

This file was deleted.

4 changes: 1 addition & 3 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
version: '3.5'
services:
build:
command: bash -c "if [ -z \"`ls -A node_modules`\" ]; then yarn; fi && yarn run serve tutor"
command: bash -c "if [ -z \"`ls -A node_modules`\" ]; then yarn; fi && yarn serve tutor"
build:
context: .
target: builder
working_dir: /code
environment:
- "OX_PROJECT_HOST=0.0.0.0"
volumes:
- .:/code:cached
ports:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"jsdom": "^16.5.0",
"json-server": "^0.15.0",
"lighthouse": "^5.2.0",
"node-sass": "^9.0.0",
"node-sass": "^7.0.0",
"object-factory-bot": "0.8.2",
"pixelmatch": "^5.0.2",
"pngjs": "^3.4.0",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const config = {
quiet: false,
noInfo: false,
clientLogLevel: 'warning',
host,
host: 'localhost',
filename: '[name].js',
hot: !isCI,
liveReload: !isCI,
Expand Down
Loading

0 comments on commit 218b046

Please sign in to comment.