7 Commits

Author SHA1 Message Date
ee8a7412f4 fix dist being in the wrong place 2023-01-15 15:32:25 +01:00
b6a775ce5f fix for alpine 2023-01-15 15:23:09 +01:00
3d0dbca403 fix cache not being properly restored 2023-01-15 15:16:21 +01:00
b1a16f6fc2 update README 2023-01-15 15:13:59 +01:00
fe8f65ac10 actually update cache 2023-01-15 15:09:28 +01:00
bb1a0a8bf9 update readme 2023-01-15 14:55:53 +01:00
320de598eb ok now it should cache 2023-01-15 14:35:22 +01:00
4 changed files with 23 additions and 12 deletions

View File

@@ -92,7 +92,6 @@ jobs:
build:
machine:
image: ubuntu-2004:current
docker_layer_caching: true
working_directory: ~/photos
resource_class: large
@@ -108,12 +107,26 @@ jobs:
- run:
name: create docker builder
command: docker buildx create --use
command: docker buildx create --use --driver=docker-container
- restore_cache:
keys:
- buildx-photos-circleci-
- run:
name: build and push to docker hub
command: docker buildx build --progress=plain --push --platform linux/arm64,linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH .
#command: docker buildx build --push --platform linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH .
command: |
docker buildx build --progress=plain --push --platform linux/arm64,linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH \
--cache-to=type=local,mode=max,dest=/tmp/dockercache \
--cache-from=type=local,src=/tmp/dockercache .
- run:
name: prune cache
command: docker buildx prune --keep-storage=2gb --verbose
- save_cache:
key: buildx-photos-circleci-{{ checksum "/tmp/dockercache/index.json" }}
paths:
- /tmp/dockercache
# build-arm:
# machine:

View File

@@ -20,7 +20,8 @@ RUN rm -rfv frontend
FROM backexceptwithoutfrontend
COPY --from=frontbuild /usr/src/app/frontend .
WORKDIR /usr/src/app
COPY --from=frontbuild /usr/src/app/frontend ./frontend
#ENV PORT=8080
#ENV TYPEORM_HOST=localhost

View File

@@ -13,19 +13,16 @@ Demo: https://photos.usatiuk.com
First, install all of the dependencies with `npm i` and `cd frontend && npm i`
You also need to create a ormconfig.json and ormconfig.test.json (only if you
You also need to create a ormconfig.json and ormconfig.test.json (the latter only if you
want to run the tests). You can use ormconfig.example.json as an example (you
only need to change the database connection settings)
### Using docker
Open the workspace in a remote docker container using VSCode - everything should
be set up for you. You just need to rename `ormconfig.dockerdevexample.json` and
be set up for you. You might need to rename `ormconfig.dockerdevexample.json` and
`ormconfig.dockerdevexample.test.json` to `ormconfig.json` and
`ormconfig.test.json`
Also, you need to run database migrations with
`npm run typeorm-dev -- migration:run`
`ormconfig.test.json` and install dependencies too (although it should be automatic)
Then start with `npm run dev` and visit http://localhost:1234 (Parcel dev server
is listening at http://localhost:1234, and koa at http://localhost:3000)

View File

@@ -1,3 +1,3 @@
#!/bin/bash
#!/bin/sh
npm start