diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..0573c605 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +MONGO_URL=mongodb://localhost/fosscord +PORT=3001 +PRODUCTION=TRUE +THREADS=# automatically use all available cores, only available if production = true \ No newline at end of file diff --git a/.gitignore b/.gitignore index ee4c71a5..628444bf 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,7 @@ dist .DS_STORE src/ready.json + +# Docker +.docker/config/* +!.docker/config/.keep \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e0d5ae68..1113978f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM node:lts-alpine -RUN mkdir -p /usr/src/fosscord-api WORKDIR /usr/src/fosscord-api -COPY package.json /usr/src/fosscord-api +COPY package.json . RUN npm install -COPY . /usr/src/fosscord-api RUN npx patch-package +COPY . . +EXPOSE 3001 CMD ["npm", "start"] \ No newline at end of file diff --git a/client_test/index.html b/client_test/index.html index 915a3378..de2fe44b 100644 --- a/client_test/index.html +++ b/client_test/index.html @@ -18,6 +18,7 @@ MEDIA_PROXY_ENDPOINT: "https://media.discordapp.net", WIDGET_ENDPOINT: "//discord.com/widget", INVITE_HOST: "discord.gg", + GUILD_TEMPLATE_HOST: "discord.new", GIFT_CODE_HOST: "discord.gift", RELEASE_CHANNEL: "stable", @@ -32,10 +33,9 @@ MIGRATION_SOURCE_ORIGIN: "https://discordapp.com", MIGRATION_DESTINATION_ORIGIN: "https://discord.com", HTML_TIMESTAMP: Date.now(), - ALGOLIA_KEY: "aca0d7082e4e63af5ba5917d5e96bed0", + ALGOLIA_KEY: "aca0d7082e4e63af5ba5917d5e96bed0" }; - -