Skip to content

Commit 20cc7c9

Browse files
jyn514Joshua Nelson
authored andcommitted
Move docker files into a subdirectory
They were starting to take up a lot of space.
1 parent c1d0fa4 commit 20cc7c9

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
fetch-depth: 2
7777

7878
- name: Build the Docker image
79-
run: docker build -t docs-rs .
79+
run: docker build -t docs-rs -f docker/Dockerfile .
8080

8181
- name: Upload the Docker image to ECR
8282
uses: rust-lang/simpleinfra/github-actions/upload-docker-image@master

docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
version: "3"
22
services:
33
web:
4-
build: .
4+
build:
5+
context: .
6+
dockerfile: ./docker/Dockerfile
57
depends_on:
68
- db
79
- s3
@@ -21,8 +23,8 @@ services:
2123
- .env
2224
db:
2325
build:
24-
context: .
25-
dockerfile: ./postgres/Dockerfile
26+
context: ./docker
27+
dockerfile: ./Dockerfile-postgres
2628
volumes:
2729
- postgres-data:/var/lib/postgresql/data
2830
environment:

Dockerfile renamed to docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ RUN mkdir -p /opt/docsrs/prefix
7474
COPY --from=build /build/target/release/cratesfyi /usr/local/bin
7575
COPY static /opt/docsrs/prefix/public_html
7676
COPY templates /opt/docsrs/templates
77-
COPY docker-entrypoint.sh /opt/docsrs/entrypoint.sh
77+
COPY docker/entrypoint.sh /opt/docsrs/
7878

7979
WORKDIR /opt/docsrs
8080
ENTRYPOINT ["/opt/docsrs/entrypoint.sh"]

docker/Dockerfile-postgres

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM postgres:alpine
2+
EXPOSE 5432
3+
4+
COPY ./install_extensions.sql /docker-entrypoint-initdb.d/
File renamed without changes.
File renamed without changes.

postgres/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)