Repository navigation
Fix docker setup - #148
Fix docker setup#148
Conversation
0e65e9d to
e39b64e
Compare
|
I would like to test |
|
If you want to use thumbor in docker you have to add the key and url to the config. Currently the url is empty that’s why it fails. |
|
@appinteractive that's the README, I've set the url. Should a database seeding in development environment create thumbnails after all? |
|
@roschaefer yes the seeding in development gets random image urls which are downloaded by the remote-images hook and then returned as (secure) thumbor urls (if configured, otherwise local paths) which then gets served by thumbor (if its running) |
b17ffea to
ad316ee
Compare
| ENV NODE_ENV=production | ||
| ENV API_PORT=3030 | ||
| # create working directory | ||
| RUN mkdir -p /API |
There was a problem hiding this comment.
Ich würde das COPY . /API direkt nach dem erstellen des API Verzeichnises machen, dann muss man später die package.json und yarn.lock auch nicht reinkopieren.
There was a problem hiding this comment.
The COPY at the end is to speed up rebuilds. Docker caches every step. If you change your files, COPY . /API is the first step to be re-run. Putting that at the end will cache all steps prior to that.
| COPY package.json /API | ||
| COPY yarn.lock /API | ||
| RUN yarn install --frozen-lockfile --non-interactive | ||
|
|
There was a problem hiding this comment.
Nachdem die Abhängigkeiten installiert wurden musste ich noch RUN yarn global add cross-env nodemon ausführen, weil das starten der API und mongod sonst nicht ging. Gerade startet bei mir nur die API nicht. Es kann server-favicon nicht geladen werden..
There was a problem hiding this comment.
that's weird, I'm going to check that
There was a problem hiding this comment.
I removed all my images, volumes and containers from the cache and rebuild everything and I cannot reproduce that error. Super weird.
|
@appinteractive Why is codacy complaining about a missing maintaner? The |
|
@roschaefer we don’t have to bother about that codacy issue for now. |
Write README
.. and overwrite in docker-compose. Move layer COPY as far as possible to the end for faster rebuild.
a7ca37a to
ed48931
Compare
Reason: I might want to set database cleaner configs withouth rebuilding the docker container. So, syncing the config/ folder would be desired. But then we don't want the configuration for the host system to get in conflict with the docker settings. Solution: Set node instance environment variable to `docker`.
Problem: Although thumbor is reachable from within the container, I cannot see any thumbnails in development environment. Maybe the seeder does not create thumbnails?
350cfc4 to
7cabe76
Compare
This PR has commits of #147 and should be rebased after #147 is merged.
Dockerfile