Skip to content

Commit 57a0cd3

Browse files
authored
Merge pull request #3189 from processing/update-docker-config
Update Docker Configuration
2 parents edcd351 + 2f092ef commit 57a0cd3

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM node:16.14.2 as base
1+
FROM node:16.14.2 AS base
22
ENV APP_HOME=/usr/src/app \
33
TERM=xterm
44
RUN mkdir -p $APP_HOME
55
WORKDIR $APP_HOME
66
EXPOSE 8000
77
EXPOSE 8002
88

9-
FROM base as development
9+
FROM base AS development
1010
ENV NODE_ENV development
1111
COPY package.json package-lock.json ./
1212
RUN npm install
@@ -18,11 +18,11 @@ COPY translations/locales ./translations/locales
1818
COPY public ./public
1919
CMD ["npm", "start"]
2020

21-
FROM development as build
21+
FROM development AS build
2222
ENV NODE_ENV production
2323
RUN npm run build
2424

25-
FROM base as production
25+
FROM base AS production
2626
ENV NODE_ENV=production
2727
COPY package.json package-lock.json index.js ./
2828
RUN npm install --production

contributor_docs/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Note that this takes up a significant amount of space on your machine. Make sure
5050
2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/)
5151
3. Clone this repository and cd into it
5252
4. `$ docker-compose -f docker-compose-development.yml build`
53+
* Note: Depending on which version of Docker Compose you are using, the base command will be either `docker-compose` or `docker compose`. More information about it can be found in Docker Compose's documentation for their [V1 to V2 transition](https://github.com/docker/compose/tree/v1?tab=readme-ov-file#v1-vs-v2-transition-hourglass_flowing_sand).
5354
5. `$ cp .env.example .env`
5455
6. (Optional) Update `.env` with necessary keys to enable certain app behaviors, i.e. add Github ID and Github Secret if you want to be able to log in with Github.
5556
* See the [GitHub API Configuration](#github-api-configuration) section for information on how to authenticate with Github.

docker-compose-development.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
version: '3.4'
21
services:
32
mongo:
4-
image: mongo:4.4
3+
image: mongo:5.0
54
volumes:
65
- dbdata:/data/db
76
app:

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
version: '3.4'
21
services:
32
mongo:
4-
image: mongo:4.4
3+
image: mongo:5.0
54
volumes:
65
- dbdata:/data/db
76
app:

server/models/collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ collectionSchema.set('toJSON', {
4848
});
4949

5050
collectionSchema.pre('save', function generateSlug(next) {
51-
this.slug = slugify(this.name, { lower: true, strict: true });
51+
this.slug = slugify(this.name, '_');
5252
next();
5353
});
5454

server/models/project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ projectSchema.set('toJSON', {
5353

5454
projectSchema.pre('save', function generateSlug(next) {
5555
if (!this.slug) {
56-
this.slug = slugify(this.name, { lower: true, strict: true });
56+
this.slug = slugify(this.name, '_');
5757
}
5858
next();
5959
});

server/scripts/examples.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function getCategories() {
3030
const categories = [];
3131
const options = {
3232
url:
33-
'https://api.github.com/repos/processing/p5.js-website/contents/src/data/examples/en',
33+
'https://api.github.com/repos/processing/p5.js-website-legacy/contents/src/data/examples/en',
3434
method: 'GET',
3535
headers: {
3636
...headers,
@@ -205,7 +205,7 @@ async function addAssetsToProject(assets, response, project) {
205205
// for assets files that are not .vert or .frag extension
206206
project.files.push({
207207
name: assetName,
208-
url: `https://cdn.jsdelivr.net/gh/processing/p5.js-website@main/src/data/examples/assets/${assetName}`,
208+
url: `https://cdn.jsdelivr.net/gh/processing/p5.js-website-legacy@main/src/data/examples/assets/${assetName}`,
209209
id: fileID,
210210
_id: fileID,
211211
children: [],
@@ -223,7 +223,7 @@ async function addAssetsToProject(assets, response, project) {
223223
async function createProjectsInP5user(projectsInAllCategories) {
224224
const options = {
225225
url:
226-
'https://api.github.com/repos/processing/p5.js-website/contents/src/data/examples/assets',
226+
'https://api.github.com/repos/processing/p5.js-website-legacy/contents/src/data/examples/assets',
227227
method: 'GET',
228228
headers: {
229229
...headers,
@@ -364,7 +364,7 @@ async function getp5User() {
364364
const categories = await getCategories();
365365
const sketchesInCategories = await getSketchesInCategories(categories);
366366
const sketchContent = await getSketchContent(sketchesInCategories);
367-
const projectsInUser = createProjectsInP5user(sketchContent);
367+
const projectsInUser = await createProjectsInP5user(sketchContent);
368368
return projectsInUser;
369369
}
370370

0 commit comments

Comments
 (0)