mirror of
https://github.com/barthuijgen/factorio-sites.git
synced 2024-11-21 18:16:33 +02:00
commit
140745211d
29
.github/workflows/deploy_dev.yml
vendored
29
.github/workflows/deploy_dev.yml
vendored
@ -10,33 +10,24 @@ jobs:
|
||||
environment: blueprints-dev
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn
|
||||
node-version: 18
|
||||
cache: "yarn"
|
||||
- run: yarn --prefer-offline
|
||||
- run: yarn nx build blueprints
|
||||
env:
|
||||
CF_WEB_ANALYTICS: 6c563c1e5db141129a5fc95d5c459722
|
||||
- name: Authenticate gcloud
|
||||
uses: google-github-actions/auth@v1
|
||||
with:
|
||||
credentials_json: "${{ secrets.GCP_SA_KEY }}"
|
||||
- name: Set up Cloud SDK
|
||||
uses: google-github-actions/setup-gcloud@v1
|
||||
with:
|
||||
project_id: ${{ secrets.GCP_PROJECT_ID }}
|
||||
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
||||
export_default_credentials: true
|
||||
- run: gcloud auth configure-docker --quiet
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: blueprints.github.Dockerfile
|
||||
|
19
.github/workflows/deploy_prd.yml
vendored
19
.github/workflows/deploy_prd.yml
vendored
@ -10,21 +10,12 @@ jobs:
|
||||
environment: blueprints-prd
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn
|
||||
node-version: 18
|
||||
cache: "yarn"
|
||||
- run: yarn --prefer-offline
|
||||
- run: yarn nx build blueprints
|
||||
env:
|
||||
PUBLIC_URL: https://factorio-blueprints-assets.storage.googleapis.com/public
|
||||
|
17
.github/workflows/validate.yml
vendored
17
.github/workflows/validate.yml
vendored
@ -6,20 +6,11 @@ jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: 18
|
||||
cache: "yarn"
|
||||
- run: yarn --prefer-offline
|
||||
- run: yarn nx run-many --all --target=lint
|
||||
- run: yarn nx run-many --all --target=test "--ci"
|
||||
|
@ -1,6 +1,8 @@
|
||||
[
|
||||
{
|
||||
"origin": [
|
||||
"https://factorio.tools",
|
||||
"https://dev.factorio.tools",
|
||||
"https://factorioblueprints.tech",
|
||||
"https://static.factorioblueprints.tech",
|
||||
"https://dev.factorioblueprints.tech"
|
||||
|
1
apps/blueprints/public/discord_logo.svg
Normal file
1
apps/blueprints/public/discord_logo.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 272.1"><style>.st0{fill:#7289DA;}</style><path class="st0" d="M142.8 120.1c-5.7 0-10.2 4.9-10.2 11s4.6 11 10.2 11c5.7 0 10.2-4.9 10.2-11s-4.6-11-10.2-11zM106.3 120.1c-5.7 0-10.2 4.9-10.2 11s4.6 11 10.2 11c5.7 0 10.2-4.9 10.2-11 .1-6.1-4.5-11-10.2-11z"/><path class="st0" d="M191.4 36.9h-134c-11.3 0-20.5 9.2-20.5 20.5v134c0 11.3 9.2 20.5 20.5 20.5h113.4l-5.3-18.3 12.8 11.8 12.1 11.1 21.6 18.7V57.4c-.1-11.3-9.3-20.5-20.6-20.5zm-38.6 129.5s-3.6-4.3-6.6-8c13.1-3.7 18.1-11.8 18.1-11.8-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.4-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.6-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.2-1.8-1-2.8-1.7-2.8-1.7s4.8 7.9 17.5 11.7c-3 3.8-6.7 8.2-6.7 8.2-22.1-.7-30.5-15.1-30.5-15.1 0-31.9 14.4-57.8 14.4-57.8 14.4-10.7 28-10.4 28-10.4l1 1.2c-18 5.1-26.2 13-26.2 13s2.2-1.2 5.9-2.8c10.7-4.7 19.2-5.9 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.5 0 0-7.9-7.5-24.9-12.6l1.4-1.6s13.7-.3 28 10.4c0 0 14.4 25.9 14.4 57.8 0-.1-8.4 14.3-30.5 15zM303.8 79.7h-33.2V117l22.1 19.9v-36.2h11.8c7.5 0 11.2 3.6 11.2 9.4v27.7c0 5.8-3.5 9.7-11.2 9.7h-34v21.1h33.2c17.8.1 34.5-8.8 34.5-29.2v-29.8c.1-20.8-16.6-29.9-34.4-29.9zm174 59.7v-30.6c0-11 19.8-13.5 25.8-2.5l18.3-7.4c-7.2-15.8-20.3-20.4-31.2-20.4-17.8 0-35.4 10.3-35.4 30.3v30.6c0 20.2 17.6 30.3 35 30.3 11.2 0 24.6-5.5 32-19.9l-19.6-9c-4.8 12.3-24.9 9.3-24.9-1.4zM417.3 113c-6.9-1.5-11.5-4-11.8-8.3.4-10.3 16.3-10.7 25.6-.8l14.7-11.3c-9.2-11.2-19.6-14.2-30.3-14.2-16.3 0-32.1 9.2-32.1 26.6 0 16.9 13 26 27.3 28.2 7.3 1 15.4 3.9 15.2 8.9-.6 9.5-20.2 9-29.1-1.8l-14.2 13.3c8.3 10.7 19.6 16.1 30.2 16.1 16.3 0 34.4-9.4 35.1-26.6 1-21.7-14.8-27.2-30.6-30.1zm-67 55.5h22.4V79.7h-22.4v88.8zM728 79.7h-33.2V117l22.1 19.9v-36.2h11.8c7.5 0 11.2 3.6 11.2 9.4v27.7c0 5.8-3.5 9.7-11.2 9.7h-34v21.1H728c17.8.1 34.5-8.8 34.5-29.2v-29.8c0-20.8-16.7-29.9-34.5-29.9zm-162.9-1.2c-18.4 0-36.7 10-36.7 30.5v30.3c0 20.3 18.4 30.5 36.9 30.5 18.4 0 36.7-10.2 36.7-30.5V109c0-20.4-18.5-30.5-36.9-30.5zm14.4 60.8c0 6.4-7.2 9.7-14.3 9.7-7.2 0-14.4-3.1-14.4-9.7V109c0-6.5 7-10 14-10 7.3 0 14.7 3.1 14.7 10v30.3zM682.4 109c-.5-20.8-14.7-29.2-33-29.2h-35.5v88.8h22.7v-28.2h4l20.6 28.2h28L665 138.1c10.7-3.4 17.4-12.7 17.4-29.1zm-32.6 12h-13.2v-20.3h13.2c14.1 0 14.1 20.3 0 20.3z"/></svg>
|
After Width: | Height: | Size: 2.3 KiB |
BIN
apps/blueprints/public/github_logo.png
Normal file
BIN
apps/blueprints/public/github_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
@ -111,6 +111,11 @@ const BlueprintsApp = ({
|
||||
};
|
||||
|
||||
BlueprintsApp.getInitialProps = ({ ctx }: AppContext) => {
|
||||
// if (ctx.req?.headers?.host === "factorioblueprints.tech" && ctx.res) {
|
||||
// ctx.res.statusCode = 302;
|
||||
// ctx.res.setHeader("Location", "https://factorio.tools" + ctx.req?.url);
|
||||
// }
|
||||
|
||||
const userToken = getSessionToken(ctx.req);
|
||||
return { authenticated: !!userToken };
|
||||
};
|
||||
|
@ -26,21 +26,26 @@ export const Index: NextPage = () => {
|
||||
<Box>
|
||||
<h2 style={{ fontSize: "30px" }}>Factorio Blueprints by Barry</h2>
|
||||
</Box>
|
||||
<Box css={{ marginRight: "1rem" }}>
|
||||
<h3 style={{ color: "orange" }}>
|
||||
Work in progress! <IoIosConstruct css={{ display: "inline-block" }} />
|
||||
</h3>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box>
|
||||
<p>
|
||||
Factorio blueprints aims to be a feature complete blueprints library where you can
|
||||
upload, organize and search for blueprints. It scans uploaded blueprints and blueprint
|
||||
books to break down their contents allowing you to view and copy individual blueprints,
|
||||
but also power the search where you can find any type of entity and recipe, even modded
|
||||
once.
|
||||
</p>
|
||||
<p>
|
||||
If you have any suggestions or feedback please join our discord below or create an
|
||||
github issue and get in touch!
|
||||
</p>
|
||||
</Box>
|
||||
<Box css={headerCss}>
|
||||
<h3>Join our discord server</h3>
|
||||
</Box>
|
||||
<Box>
|
||||
<Link href="https://discord.gg/87b92d6vDk" target="__blank" rel="noopener">
|
||||
<Image
|
||||
src="https://discord.com/assets/e4923594e694a21542a489471ecffa50.svg"
|
||||
height="35px"
|
||||
/>
|
||||
<Image src="./discord_logo.svg" height="35px" />
|
||||
</Link>
|
||||
</Box>
|
||||
<Box css={headerCss}>
|
||||
@ -52,10 +57,7 @@ export const Index: NextPage = () => {
|
||||
target="__blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<Image
|
||||
src="https://github.githubassets.com/images/modules/logos_page/GitHub-Logo.png"
|
||||
css={{ height: "25px", display: "inline" }}
|
||||
/>
|
||||
<Image src="./github_logo.png" css={{ height: "25px", display: "inline" }} />
|
||||
</Link>
|
||||
</Box>
|
||||
<Box css={headerCss}>
|
||||
@ -115,7 +117,7 @@ export const Index: NextPage = () => {
|
||||
target="__blank"
|
||||
css={{ textDecoration: "underline" }}
|
||||
>
|
||||
Create an issue on GitHub!
|
||||
Create an issue on GitHub
|
||||
</Link>
|
||||
</Box>
|
||||
</Panel>
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { SimpleGrid, Box, Text } from "@chakra-ui/react";
|
||||
import { getUserFavoriteBlueprintPages } from "@factorio-sites/database";
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM node:14-slim as builder
|
||||
FROM node:18-slim as builder
|
||||
|
||||
RUN apt-get -qy update && apt-get -qy install openssl
|
||||
|
||||
@ -15,7 +15,7 @@ COPY . .
|
||||
|
||||
RUN yarn nx build blueprints --prod
|
||||
|
||||
FROM node:14-slim
|
||||
FROM node:18-slim
|
||||
|
||||
RUN apt-get -qy update && apt-get -qy install openssl
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM node:14-slim
|
||||
FROM node:18-slim
|
||||
|
||||
RUN apt-get -qy update && apt-get -qy install openssl
|
||||
|
||||
|
@ -46,5 +46,5 @@ const promise = _init()
|
||||
|
||||
export const init = async () => {
|
||||
await promise;
|
||||
await prisma.$connect();
|
||||
// await prisma.$connect();
|
||||
};
|
||||
|
@ -85,6 +85,8 @@
|
||||
"@nrwl/react": "13.2.1",
|
||||
"@nrwl/web": "13.2.1",
|
||||
"@nrwl/workspace": "13.2.1",
|
||||
"@pulumi/gcp": "5.0.0",
|
||||
"@pulumi/pulumi": "3.0.0",
|
||||
"@testing-library/react": "12.1.2",
|
||||
"@types/bcrypt": "5.0.0",
|
||||
"@types/cookie": "0.4.1",
|
||||
@ -119,8 +121,6 @@
|
||||
"ts-node": "10.4.0",
|
||||
"tslint": "6.1.3",
|
||||
"typescript": "4.5.2",
|
||||
"wasm-loader": "1.3.0",
|
||||
"@pulumi/pulumi": "3.0.0",
|
||||
"@pulumi/gcp": "5.0.0"
|
||||
"wasm-loader": "1.3.0"
|
||||
}
|
||||
}
|
||||
|
@ -6557,9 +6557,9 @@ caniuse-api@^3.0.0:
|
||||
lodash.uniq "^4.5.0"
|
||||
|
||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001135, caniuse-lite@^1.0.30001173, caniuse-lite@^1.0.30001181, caniuse-lite@^1.0.30001196, caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228, caniuse-lite@^1.0.30001251, caniuse-lite@^1.0.30001280:
|
||||
version "1.0.30001282"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz"
|
||||
integrity sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg==
|
||||
version "1.0.30001431"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz"
|
||||
integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==
|
||||
|
||||
caseless@~0.12.0:
|
||||
version "0.12.0"
|
||||
|
Loading…
Reference in New Issue
Block a user