try to make pico executable in docker

This commit is contained in:
dylan 2024-03-26 01:16:47 -07:00
parent 90570e4ec2
commit 132750f219
2 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,7 @@ WORKDIR /app
# ENV DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} # ENV DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
COPY ./pico8 ./pico8 COPY ./pico8 ./pico8
RUN chmod +x ./pico8/pico8
# Copies stuff to cache for install # Copies stuff to cache for install
COPY ./package.json ./package-lock.json tsconfig.json ./ COPY ./package.json ./package-lock.json tsconfig.json ./

View File

@ -21,6 +21,10 @@ const payloadT = Type.Any();
const repoPath = path.resolve(__dirname, "..", "..", "..", "repo"); const repoPath = path.resolve(__dirname, "..", "..", "..", "repo");
const picoBinPath = path.resolve(__dirname, "..", "..", "..", "pico8", "pico8"); const picoBinPath = path.resolve(__dirname, "..", "..", "..", "pico8", "pico8");
// const {stdout, } = await execa(picoBinPath, ["/home/dylan/.lexaloffle/pico-8/carts/candles/candles.p8", "-export", path.join(__dirname, "result.js")]);
// console.log(stdout);
const handler = async ({payload}: FirRouteInput<typeof payloadT>) => { const handler = async ({payload}: FirRouteInput<typeof payloadT>) => {
const {manifest, token} = payload; const {manifest, token} = payload;
if (!fs.existsSync(repoPath)) { if (!fs.existsSync(repoPath)) {