refactor: build development Tailwind CSS in a separate Docker service
This commit is contained in:
		| @@ -1,27 +1,16 @@ | ||||
| # 1.83.0-bookworm | ||||
| FROM rust@sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b | ||||
|  | ||||
| RUN cargo install dioxus-cli diesel_cli \ | ||||
|  && apt-get update && apt-get install -y --no-install-recommends \ | ||||
|     nodejs=18.19.0+dfsg-6~deb12u2 \ | ||||
|     npm=9.2.0~ds1-1 \ | ||||
|     supervisor=4.2.5-1 \ | ||||
|  && apt-get clean \ | ||||
|  && rm -rf /var/lib/apt/lists/* | ||||
| RUN cargo install dioxus-cli diesel_cli | ||||
|  | ||||
| COPY . /srv/app | ||||
| WORKDIR /srv/app | ||||
|  | ||||
| RUN npm install | ||||
|  | ||||
| COPY docker/dev/app/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||||
|  | ||||
| RUN chown -R 1000:1000 /srv/app \ | ||||
|  && chown -R 1000:1000 /usr/local/cargo \ | ||||
|  && mkdir -p /.local/share/dioxus \ | ||||
|  && chown -R 1000:1000 /.local/share/dioxus | ||||
| RUN mkdir -p /.local/share/dioxus \ | ||||
|  && chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus | ||||
|  | ||||
| HEALTHCHECK CMD curl --fail -H "Accept: text/html" http://localhost:8000 || exit 1 | ||||
|  | ||||
| USER 1000:1000 | ||||
|  | ||||
| CMD ["sh", "docker/dev/app/entrypoint.sh"] | ||||
| CMD ["dx", "serve", "--addr", "0.0.0.0", "--port", "8000"] | ||||
|   | ||||
| @@ -1,3 +0,0 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| supervisord -c /etc/supervisor/conf.d/supervisord.conf | ||||
| @@ -1,23 +0,0 @@ | ||||
| [supervisord] | ||||
| nodaemon=true | ||||
| logfile=/dev/null | ||||
| logfile_maxbytes=0 | ||||
| pidfile=/dev/null | ||||
|  | ||||
| [program:npm] | ||||
| command=npm run watch | ||||
| directory=/srv/app | ||||
| autostart=true | ||||
| autorestart=true | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=true | ||||
|  | ||||
| [program:dx] | ||||
| command=dx serve --addr 0.0.0.0 --port 8000 | ||||
| directory=/srv/app | ||||
| autostart=true | ||||
| autorestart=true | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=true | ||||
		Reference in New Issue
	
	Block a user
	 Gitea
						Gitea