nicbet / docker-phoenix

A dockerized Phoenix development and runtime environment.
GNU General Public License v3.0
277 stars 57 forks source link

Reorganize Directory Structure as suggested in Issue #24 #25

Closed restlessronin closed 2 years ago

restlessronin commented 2 years ago

@nicbet I reorganized as you suggested with the following change.

I split the scripts into ones that belonged in the build and those that belonged in the vscode worspace, and placed them in the appropriate directories.

Also, I moved

ENV APP_HOME /app
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME

CMD ["mix", "phx.server"]

from the main Dockerfile to the workspace Dockerfile, because the actual user working directory is not available when the main Dockerfile is built. I also changed

ENV APP_HOME /app

to

ARG APP_HOME /app

I'm no docker expert, but I think these are correct. Please point out any errors in my assumptions.

Testing is very sparse, but since the build scripts are in the same relative directory, everything should work as before.

The README will have to be re-written with the new structure.

nicbet commented 2 years ago

@restlessronin Thanks again for your contribution! I've integrated them into the latest master branch by hand, as there were a few issues around building the multiarch images with GitHub Actions.

Closing this PR.

By the way - I've moved the 1.6.2 tag to the latest git commit on master, which triggered a rebuild by GH actions and pushed a multiarch image to Docker Hub - so things should work now with your M1 Mac.

restlessronin commented 2 years ago

@nicbet Thanks for enabling the M1. I will test it when I get a chance.