mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-28 23:37:48 +01:00
Compare commits
7 Commits
f97e6aeb38
...
ee8a7412f4
| Author | SHA1 | Date | |
|---|---|---|---|
| ee8a7412f4 | |||
| b6a775ce5f | |||
| 3d0dbca403 | |||
| b1a16f6fc2 | |||
| fe8f65ac10 | |||
| bb1a0a8bf9 | |||
| 320de598eb |
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
npm start
|
||||
|
||||
Reference in New Issue
Block a user